bool stuffDone = false;
int dayOfMonth;
if (dayOfMonth == 4 && !stuffDone)
{
// do stuff here
// will only run once, because at the end...
stuffDone = true;
}
if (dayOfMonth != 4)
{
// the next day, we reset it
stuffDone = false;
}
1 Like