Operating System - HP-UX
1837523 Members
3961 Online
110117 Solutions
New Discussion

Crontab / Is this possible?

 
SOLVED
Go to solution
D. Jackson_1
Honored Contributor

Crontab / Is this possible?

0,5,10,15,20,25,30,35,40,45,50,55 0,2-23 * 1-6 /usr/local/bin/blah/blah.sh

or

0,5,10,15,20,25,30,35,40,45,50,55 0-7,9-23 * 1-6 /usr/local/bin/blah/blah.sh

Thnx
DCJ
6 REPLIES 6
Jeff Schussele
Honored Contributor

Re: Crontab / Is this possible?

Hi D,

Appears to me you're leaving out a field in both - "month of the year 1-12"...else, yes it'd work.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
D. Jackson_1
Honored Contributor

Re: Crontab / Is this possible?

Yes Jeff you are right I did leave out a * field. So my hours field would/should work okay??

Thnx
Helen French
Honored Contributor

Re: Crontab / Is this possible?

I think YES !

Remember about the month date field that you are missing at the original post.
Life is a promise, fulfill it!
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Crontab / Is this possible?

I suppose you are wondering about the 0,2-23 or other combinations within the same field. Yes, that is legal.
If it ain't broke, I can fix that.
Rodney Hills
Honored Contributor

Re: Crontab / Is this possible?

Rather than starting up a new process every 5 minutes, you could launch the process once and have it loop and sleeping for 5 minutes.

example-

#!/usr/bin/ksh
while (1) ; do
...
...
sleep 300
done

-- Rod Hills
There be dragons...
D. Jackson_1
Honored Contributor

Re: Crontab / Is this possible?

Thanks All

Keep on rockin.

DCJ