if ($hour == 17 && $min ==0 ...
Unless your program is running continuously (which seems a waste of processorcycles) , you only have a one minute window in which this test will be triggered, so you should be pretty sure that indeed you do not miss this window.
On the other hand if your program does run continuously, you have to test whether your file exists already or you will be overwriting it several times within the window.
CountZero
A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
In reply to Re: potential date and time issues / code cleanup
by CountZero
in thread potential date and time issues / code cleanup
by Conal
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |