I'm having trouble running a cron job at particular times during the day.
Will this crontab setting run the command at 3am, 6am, noon, 6pm, and 9pm?
0 3,6,12,18,21 * * * command
|
I'm having trouble running a cron job at particular times during the day. Will this crontab setting run the command at 3am, 6am, noon, 6pm, and 9pm?
| |||
|
feedback
|
This question came from our site for professional and enthusiast programmers.
|
If that is in a user crontab (edited with If that is in the system crontab (
| |||
|
feedback
|
|
Your cron specification is correct. If it doesn't appear to be running, it may be a PATH problem (i.e., your script references something in /usr/local/bin). If that's the case, you can stick something like
etc., at the top of your crontab to set the PATH for the cron jobs. (You can do something like "echo $PATH" at the command line to see the current PATH). | |||
|
feedback
|
|
Yes, afaik, this should work. Did you already try it? | ||||
|
feedback
|