damian has asked for the wisdom of the Perl Monks concerning the following question:

hi guys, any idea or alternatives to cron? it seems running scripts via cronjobs is not that 100% sure. thnks

Replies are listed 'Best First'.
RE: crontab alternatives
by moen (Hermit) on Sep 19, 2000 at 12:20 UTC
      On many systems at is implemented using cron.

      Gryn

Re: crontab use
by Blue (Hermit) on Sep 19, 2000 at 17:35 UTC
    This may not help with a crontab alternative, but a few of the traps I've been caught on in cron in the past are:

    * Environment is not set - so if you need a path or environment variables, you need to set them yourself. This is the biggest. If you want to remove this as a suspect, explicitly declare all environment variables and call everything by absolute path.

    * Right times in the right columns - one "day of month" in a "day of week" or other column switch can lead to results you were not expecting.

    * Other cron jobs interfering - had one cron job that was flaky, found out it was because a differnet cron job was modifying the data file at a certain point, and if the first hadn't completed odd things happened.

    Hope this helps,
    =Blue

Re: crontab alternatives
by fundflow (Chaplain) on Sep 19, 2000 at 17:14 UTC
    On a reasonably maintained unix machine, cron should work without a problem.

    If your program doesn't always run, try to check the paths/programs that you use, maybe they are not always available (e.g. NFS problems etc)

Re (tilly) 1: crontab alternatives
by tilly (Archbishop) on Sep 19, 2000 at 17:34 UTC
    Learn how to use cron and crontabs. Get someone in your environment who knows how to do it to teach you.

    Honest. Cron jobs are a standard thing and if they do not work right then you don't have something (eg path, user ID, cron file, etc) set up right for your job or else you do not have cron properly installed.

Reliable Cron
by gryng (Hermit) on Sep 19, 2000 at 21:26 UTC
    The only time that cron jobs would fail (that is directly related to cron) would be if the machine was off when a job was scheduled. In that case the cron would not run that event when you turned the box back on.

    There are versions of cron that do have this feature, though. However, I would advise you to use it sparingly (think of a job that runs once a minute, and you leave your box off for a day :) ).

    All other things that could cause a cron job to fail, such as low disk space, are going to be problems you will face no matter what -- and cron cannot (reasonably) do anything about them. It's up to your scripts to run correctly under those extreme circumstances.

    Ciao,
    Gryn

RE: crontab alternatives
by Jouke (Curate) on Sep 19, 2000 at 12:34 UTC
    Of course you could always write your own in Perl :), it would surely speed up your scripts a bit, since they wouldn't have to start Perl themselves...

    Jouke Visser, Perl 'Adept'
Re: crontab alternatives
by belg4mit (Prior) on Feb 13, 2005 at 11:10 UTC
Re: crontab alternatives
by Anonymous Monk on Aug 07, 2009 at 09:14 UTC
    Try this its free: http://www.phpjobscheduler.co.uk/
        No it couldn't dear shill, it is in no way an alternative for crontab