in reply to timed email reminder
This should do something every 6th day, otherwise it just sleeps. This isn't particularly elegant code, or robust for that matter, so I wouldn't recommend a copy'n'paste ;o)use strict; my $day = (localtime())[3]; while($day < 31) { if(0 == $day % 6) { do_email_program_thingy(); } else { sleep(60 * 60 * 24); } $day = (localtime())[3]; }
broquaint
|
---|