bganoush
asked on
Schedule cronjob every minute?
Is there any way to schedule a cronjob to run more often than once per hour?
The only way I have found to do this is by repeating my cron entry for every minute of the hour:
01 * * * *.... script....
02 * * * *.... script....
03 * * * *.... script....
04 * * * *.... script....
.....
The only way I have found to do this is by repeating my cron entry for every minute of the hour:
01 * * * *.... script....
02 * * * *.... script....
03 * * * *.... script....
04 * * * *.... script....
.....
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
hm...
That didn't work.. it says "unexpected character found in line..."
What *nix?
uname -a
also do
man crontab
and check if this syntax is allowed.
uname -a
also do
man crontab
and check if this syntax is allowed.
ASKER
AIX 6...
no, the man crontab doesn't mention anything about smaller intervals.
Oh in that case you probably will have to list all from 0 to 59 like this
0,1,2,3 * * * * script
You may want to try
* * * * * script
also.
0,1,2,3 * * * * script
You may want to try
* * * * * script
also.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yes sorry, I should have written it better... I was wondering about "other" values like every 5 minutes, or every 2 minutes...
But thanks anyway.
*/n in any field means every n min (or hr etc) but if this format is not supported in your system then you will have to list all possible values , separated. For example
0,10,20,30,40,50 * * * * script
would run every 10 minutes. In short hand it could be
*/10 * * * * script
if */n was supported in your system.
0,10,20,30,40,50 * * * * script
would run every 10 minutes. In short hand it could be
*/10 * * * * script
if */n was supported in your system.
ASKER
kule