How to setup a cron job to run every 45 minutes in Solaris 5.10
45 * * * *
it is not work its run every hour like 12:45, 13:45 ...
0,15,30,45 * * * *
Your script will be called every 15 minutes. The script then needs to check if it is 45 minutes
since it was last run (by means of a counter, timestamp, etc.) and only continue if it is at the 45 minute interval.
We guess you need run the script at below time:
0:00, 0:45, 1:30, 2:15m 3:00, 3:45, etc.
So you need set 3 cronjobs.
0,45 0,3,6,9,12,15,18,21 * * * Your_script
30 1,4,7,10,13,16,19,22 * * * Your_script
15 2,5,8,11,14,17,20,23 * * * Your_script
You can try this
*/45 * * * * script_name
here */45 in minutes fields indicates in every 45 minutes.
does this technique */45 worked, did any one tested
kindly see the link below where you will find that the above technique is absolutely correct.
How to Create a Cron Job (Scheduled Task) for Your Website or Blog (thesitewizard.com)
look at the paragraph below:-
Alternate Hour or 3 Hourly Schedule
If you want something to run once every two hours, you will have to use the slash, "/", character in your field.
The slash character is the "step" character. In the case of a two hourly schedule,
your time component of your cron file will read:
0 */2 * * *
The second field, "*/2", means every alternate hour.
Similarly, if you want something to run every 3 hours, you can change that field to "*/3", and so on.
BR
It doesn't work in Solaris, and for that matter anywhere, I would imagine:
Linux:
# crontab -l
*/45 * * * * date >> /tmp/cr_data
# cat cr_data
Mon Aug 16 14:45:01 CEST 2010
Mon Aug 16 15:00:01 CEST 2010
Solaris (10):
"/tmp/crontabh2aOTC" 9 lines, 287 characters
*/45 * * * * date >> /tmp/cr_data
crontab: error on previous line; unexpected character found in line.
crontab: errors detected in input, no crontab file generated.
The '/' syntax is not supported in Solaris' cron implementation:
$ crontab -e
*/45 * * * * echo Hi
crontab: error on previous line; unexpected character found in line.
crontab: errors detected in input, no crontab file generated.
---------- Post updated at 15:08 ---------- Previous update was at 15:06 ----------
Oops, simultaneous post, scottn.