Hi,
is there a way to launch a crontab entry on AIX 5.2.0.0, ie each two
mondays ?
--
Pat
Printable View
Hi,
is there a way to launch a crontab entry on AIX 5.2.0.0, ie each two
mondays ?
--
Pat
On Fri, 09 May 2008 11:24:23 +0200, Patrick Tonnerre
<nospam@nospam.org> wrote:
[color=blue]
>Hi,
>
>is there a way to launch a crontab entry on AIX 5.2.0.0, ie each two
>mondays ?[/color]
Nope. Can't be done.
Patrick Tonnerre wrote:[color=blue]
> Hi,
>
> is there a way to launch a crontab entry on AIX 5.2.0.0, ie each two
> mondays ?
>[/color]
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
** Posted from [url]http://www.teranews.com[/url] **
On Fri, 09 May 2008 10:13:55 -0400, smallpond <smallpond@juno.com>
wrote:
[color=blue]
>Patrick Tonnerre wrote:[color=green]
>> Hi,
>>
>> is there a way to launch a crontab entry on AIX 5.2.0.0, ie each two
>> mondays ?
>>[/color]
>
>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[/color]
That sounds dumb. Are youz some kind of asshole?