Creating a cronjob that runs at 3:00am, 3:50am, 9:00am, & 9:50am? [duplicate]
How would I go about creating a cronjob that runs at the following times every day:
- 3:00am
- 3:50am
- 9:00am
- 9:50am
I tried this but it doesn't seem to be working:
00,50 3,9 * * * /usr/bin/something.sh
The Solution
After much poking around in the logs, it turns out the issue was another script higher up in the crontab was segfaulting so my crontab entry never ran at all.
I disabled those scripts and my entry ran just fine. Also, it turns out that the syntax above is perfectly valid.
Is /usr/bin/something.sh
executable ?
Check
/var/log/cron or /var/log/messages
depending on your distribution.
Both of the above are good answers/questions. I ran across this yesterday and it might give you some ideas:
Practical Crontab Examples
0 3,9 * * * /usr/bin/something.sh
50 3,9 * * * /usr/bin/something.sh