| Author |
Message |
dawaves@gmail.com *nix forums beginner
Joined: 27 Apr 2006
Posts: 48
|
Posted: Mon Jul 03, 2006 10:56 pm Post subject:
Cron : Step Values
|
|
|
It does not seem that AIX can support Cron Step Values. Is this true?
I want to set up a recurring job where a certain script will run every
28 days. I know that step values can take care of this problem but
whenever I try to do a cronjob, it does not work.
For example:
-------------------------------------------------------------------------------
#crontab -e
..
..
..
..
0 9 10/28 7 * /tmp/somescript.sh 1>/dev/null 2>/dev/null
"/tmp/crontabB-Ajqa" 44 lines, 1783 characters
A line of the crontab file:
0 9 10/28 7 * /tmp/somescript.sh 1>/dev/null 2>/dev/null
contains the following error:
0481-079 Reached a symbol that is not expected.
#
---------------------------------------------------------------------------------------
Any ideas as to how to go about getting this job going?
Thanks! |
|
| Back to top |
|
 |
mr kay *nix forums addict
Joined: 11 Apr 2005
Posts: 50
|
Posted: Tue Jul 04, 2006 4:16 am Post subject:
Re: Cron : Step Values
|
|
|
only on 28th every month? The format is straight forward.
minute hour day_of_month month weekday command
0 9 28 * * /tmp/somescript.sh 1>/dev/null 2>/dev/null
RGDS
dawaves wrote:
| Quote: | It does not seem that AIX can support Cron Step Values. Is this true?
I want to set up a recurring job where a certain script will run every
28 days. I know that step values can take care of this problem but
whenever I try to do a cronjob, it does not work.
For example:
-------------------------------------------------------------------------------
#crontab -e
.
.
.
.
0 9 10/28 7 * /tmp/somescript.sh 1>/dev/null 2>/dev/null
"/tmp/crontabB-Ajqa" 44 lines, 1783 characters
A line of the crontab file:
0 9 10/28 7 * /tmp/somescript.sh 1>/dev/null 2>/dev/null
contains the following error:
0481-079 Reached a symbol that is not expected.
#
---------------------------------------------------------------------------------------
Any ideas as to how to go about getting this job going?
Thanks! |
|
|
| Back to top |
|
 |
Centurion *nix forums beginner
Joined: 02 Mar 2005
Posts: 28
|
Posted: Tue Jul 04, 2006 6:37 am Post subject:
Re: Cron : Step Values
|
|
|
mrkhairy@yahoo.com wrote:
| Quote: | dawaves wrote:
It does not seem that AIX can support Cron Step Values. Is this true?
I want to set up a recurring job where a certain script will run every
28 days. I know that step values can take care of this problem but
whenever I try to do a cronjob, it does not work.
For example:
-------------------------------------------------------------------------------
#crontab -e
0 9 10/28 7 * /tmp/somescript.sh 1>/dev/null 2>/dev/null
"/tmp/crontabB-Ajqa" 44 lines, 1783 characters
A line of the crontab file:
0 9 10/28 7 * /tmp/somescript.sh 1>/dev/null 2>/dev/null
contains the following error:
only on 28th every month? The format is straight forward.
minute hour day_of_month month weekday command
0 9 28 * * /tmp/somescript.sh 1>/dev/null 2>/dev/null
RGDS
|
(Don't top post)
But the 28th of each month is not the same as every 28 days.
For the OP, in the past when I've hit these problems I've moved the
timing logic out to the script and use cron to simply trigger the job at
some fraction interval of the desired. IOW, 28 days = 4*7. Cron CAN
trigger a job once every 7 days.
So you run the job every Sunday (for instance) and the job checks to see
if it has been 28 days since the last execution (or if this is the 4th
time it's been called by cron, etc) - *how* to do this in the job/script
is an exercise for you. It's not perfect, but it will achieve the
desired result.
FWIW, I haven't hit this problem in a long time as I've spent the last
few years running Solaris and other open source Unix clones (which will
remain unmentionable ). Prior to that I did a fair bit of work with
AIX, so my apologies if my AIX advice isn't 100% current :)
HTH,
James |
|
| Back to top |
|
 |
florian.heigl@gmail.com *nix forums beginner
Joined: 17 Jul 2005
Posts: 24
|
Posted: Tue Jul 04, 2006 4:55 pm Post subject:
Re: Cron : Step Values
|
|
|
dawaves schrieb:
| Quote: | It does not seem that AIX can support Cron Step Values. Is this true?
I want to set up a recurring job where a certain script will run every
28 days. I know that step values can take care of this problem but
whenever I try to do a cronjob, it does not work.
|
Doesn't work on HP-UX and AIX for all I know. Sorry.
Maybe the companies selling batch schedulers pay OS vendors not to
implement it.  |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|