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
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