in reply to Scheduling with Perl?

One crontab entry:

30 1,3,5,7,9,11,13,15,17,19,21,23 * * * echo "run every odd half hour"

but I agree, 0-23/2 would look nicer in the crontab

-derby

Replies are listed 'Best First'.
Re: Re: Scheduling with Perl?
by waswas-fng (Curate) on Feb 04, 2003 at 23:04 UTC
    or:
    30 * * * * echo "run every half hour"
    And then verify that the hour is not % 2 to run every half hour in the script.
    Psudocode: if (! $currenthour % 2) { dostuff; } else { exit 0; #oopsie it is an even hour just exit }


    -Waswas
Re: Re: Scheduling with Perl?
by Anonymous Monk on Feb 05, 2003 at 01:49 UTC
    I can do one better :

    30 0-23/2 * * * foo

    -Matt