Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Crond question about steps

1 view
Skip to first unread message

0xdeadabe

unread,
May 9, 2008, 7:33:59 AM5/9/08
to
On Fri, 09 May 2008 11:24:23 +0200, Patrick Tonnerre
<nos...@nospam.org> wrote:

>Hi,
>
>is there a way to launch a crontab entry on AIX 5.2.0.0, ie each two
>mondays ?

Nope. Can't be done.

0xdeadabe

unread,
May 9, 2008, 11:50:44 PM5/9/08
to
On Fri, 09 May 2008 10:13:55 -0400, smallpond <smal...@juno.com>
wrote:

>Patrick Tonnerre wrote:
>> Hi,
>>
>> is there a way to launch a crontab entry on AIX 5.2.0.0, ie each two
>> mondays ?
>>
>

>Your best bet is to launch a wrapper script every monday. In the
>wrapper, choose whether it is an odd or even week and issue the
>target commands accordingly. The "choose odd or even" can't be
>from the beginning of the year, or it will not work across year
>boundaries, so it needs to be based on absolute time.
>
>WEEK=`perl -e 'print 1 & int(time/(60*60*24*7))'`
>
>This inaccurately sets WEEK to 0 or 1 (currently 1). Better would
>be to use one of perl's date/time modules, which do leap years,
>DST, etc. instead of calculating it yourself.
>--S

That sounds dumb. Are youz some kind of asshole?

0 new messages