http://www.perlmonks.org?node_id=11127912


in reply to Re: Using perl as a cron script?
in thread Using perl as a cron script?

Thanks DamnDirtyApe, very useful script. I have a question, if the program sleep for 60 seconds, what prevents to run the same progran more than one time (since "hour%3 ==0" conditions is testing every 60 seconds ) ?

Replies are listed 'Best First'.
Re^3: Using perl as a cron script?
by LanX (Saint) on Feb 05, 2021 at 08:17 UTC
    This post is almost 20 years old and DamnDirtyApe hasn't been here for 12 years.

    But you are right, you need to check the minute too.

    And you should be aware that this is a hack, rounding errors could easily lead to skipped jobs.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery