| Author |
Run in a 30 day increment from now
|
|
|
| Hey all... Before trying to reinvent wheels, does anyone have a script
to do more or less the following:
logic:
if [ today = 05/21/2007 ]
then
run this script (using at) incremented 30 days from now
fi
I don't need it to run on the 30th day of the month (s'what cron is
for) just once in 30 days from the current date. (Thanks in advance
before I forget)...
| |
| Casper H.S. Dik 2007-05-21, 7:22 am |
| sil <dsphunxion@gmail.com> writes:
>Hey all... Before trying to reinvent wheels, does anyone have a script
>to do more or less the following:
>logic:
>if [ today = 05/21/2007 ]
> then
> run this script (using at) incremented 30 days from now
> fi
>I don't need it to run on the 30th day of the month (s'what cron is
>for) just once in 30 days from the current date. (Thanks in advance
>before I forget)...
% at now + 30 days
at> echo And 30 days on
at> <EOT>
job 1182341860.a at Wed Jun 20 14:17:40 2007
Also possible things as "time + 30 days" (note that this will give you 30
days from the next occurence of time and if you schedule a job at
noon every 30 days, you'd probably need to reschedule using
"at noon + 29 days" though it appears to give some slack.
(rounds down to whole minutes first)
Casper
--
Expressed in this posting are my opinions. They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.
| |
|
|
| chris.l.bryant@gmail.com 2007-05-22, 1:25 pm |
| On May 21, 6:37 am, sil <dsphunx...@gmail.com> wrote:
> Hey all... Before trying to reinvent wheels, does anyone have a script
> to do more or less the following:
>
> logic:
> if [ today = 05/21/2007 ]
> then
> run this script (using at) incremented 30 days from now
> fi
>
> I don't need it to run on the 30th day of the month (s'what cron is
> for) just once in 30 days from the current date. (Thanks in advance
> before I forget)...
sil
you might try "at -f script now + 43200 minutes" 43200 minutes is
equal to 30 days.
hth,
CB
| |
| Robert Bonomi 2007-05-30, 7:20 pm |
| In article <1179747472.952250.253170@n15g2000prd.googlegroups.com>,
sil <dsphunxion@gmail.com> wrote:
>Hey all... Before trying to reinvent wheels, does anyone have a script
>to do more or less the following:
>
>logic:
>if [ today = 05/21/2007 ]
> then
> run this script (using at) incremented 30 days from now
> fi
>
>I don't need it to run on the 30th day of the month (s'what cron is
>for) just once in 30 days from the current date. (Thanks in advance
>before I forget)...
>
Any of the following will work :
'at now + 2 fortnights + 2 days <furlong'
'at now + 4 weeks + 2 days <furlong'
'at now + 30 days <furlong'
'at now + 7200 hrs <furlong'
|
|
|
|