Maybe, checking the Seconds can be with > instead of =, since there is no chance that it will miss for more than few seconds.
Next time if the Program is already On the check will be passed.