user30750: My code is:
if ((minute == 31) && (hour == 4, 6, 9, 11)) 
{
  digitalWrite(8, HIGH);
}

I want to turn on the LEDs when it is exactly 

04:31, 
06:31, 
09:31,
11:31

However, the code above doesn't work.
Might be the multiple values the reason for this?

user16085: Yes, the list of values 4, 6, 9, 11 does not mean what you think it does.
if ((minute == 31) &&  ((hour == 4) || (hour == 6) || (hour == 9) || (hour == 11))) {
    digitalWrite(8, HIGH);
}


30750: <p>My code is:</p>

<pre><code>if ((minute == 31) &amp;&amp; (hour == 4, 6, 9, 11)) 
{
  digitalWrite(8, HIGH);
}
</code></pre>

<p>I want to turn on the LEDs when it is exactly </p>

<ul>
<li>04:31, </li>
<li>06:31, </li>
<li>09:31,</li>
<li>11:31</li>
</ul>

<p>However, the code above doesn't work.<br>
Might be the multiple values the reason for this?</p>
 16085: <p>Yes, the list of values <code>4, 6, 9, 11</code> <a href="https://en.wikipedia.org/wiki/Comma_operator" rel="nofollow noreferrer">does not mean what you think it does</a>.</p>

<pre><code>if ((minute == 31) &amp;&amp;  ((hour == 4) || (hour == 6) || (hour == 9) || (hour == 11))) {
    digitalWrite(8, HIGH);
}
</code></pre>
