Psudocode: if (! $currenthour % 2) { dostuff; } else { exit 0; #oopsie it is an even hour just exit }