Need to set cron job for 45 min time interval
Need to set cron job for 45 min time interval
(OP)
Hi All,
I am not sure whether I am asking this on right forum or not but I have problem while setting the cron job.
I am trying to set the job run time for .sh file from every 1 hour to 45 min time interval, but unable to set the time.
I tried these two methods to set the time
0-59/45 * * * * * * * * exec /appl/prod/bin/test.sh >/dev/null 2>&1
*/45 * * * * * * * * exec /appl/prod/bin/test.sh >/dev/null 2>&1
and in both cases getting this error - crontab: error on previous line; unexpected character found in line.
Please suggest. Thanks in advance.
I am not sure whether I am asking this on right forum or not but I have problem while setting the cron job.
I am trying to set the job run time for .sh file from every 1 hour to 45 min time interval, but unable to set the time.
I tried these two methods to set the time
0-59/45 * * * * * * * * exec /appl/prod/bin/test.sh >/dev/null 2>&1
*/45 * * * * * * * * exec /appl/prod/bin/test.sh >/dev/null 2>&1
and in both cases getting this error - crontab: error on previous line; unexpected character found in line.
Please suggest. Thanks in advance.
RE: Need to set cron job for 45 min time interval
The internet - allowing those who don't know what they're talking about to have their say.
RE: Need to set cron job for 45 min time interval
Thanks for your reply. I need to run the job at 45 min time interval. For example if I set the test.sh file in cron starting at 00:00 then it should run at 00:00 AM then 00:45 AM then 01:30 AM then 02:15 AM then 03:00 AM then 03:45 AM etc. I mean at 45 minutes of time interval. To do this I used the above syntax but getting error. How can I do this?.
Please advice.
RE: Need to set cron job for 45 min time interval
The internet - allowing those who don't know what they're talking about to have their say.
RE: Need to set cron job for 45 min time interval
Thanks for your reply.
RE: Need to set cron job for 45 min time interval
* 0,15,30,45 * * * <command>?
And the you call the other script every third time.