Timeline for Cron job does not execute according to time schedule
Current License: CC BY-SA 4.0
16 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 26 at 11:31 | answer | added | Clint William Theron | timeline score: 0 | |
Jan 26 at 8:32 | comment | added | Clint William Theron | Let us continue this discussion in chat. | |
Jan 26 at 8:28 | comment | added | Clint William Theron | I'm in South Africa. Our zone is GMT+2. The cron job is working now. I don't know why it's working correctly now and it even uses my time. I created a cron job with command service crond restart. Could that be it? I'm not sure if it did execute - I'm not sure if I can run commands like that in a cron job. All I know, for sure, is that I can call a script in the cron job command. zoneDateTime and systemDateTime comes from php code. You can see that in my Update Note. | |
Jan 26 at 8:20 | comment | added | Chris Davies |
"How do I see what timezone crontab is configured to use?" - something else that's troubling me. In the image you've posted there's a zoneDateTime and a systemDateTime . (a) which one has the correct time for you, (b) which country are you in?
|
|
Jan 26 at 8:17 | comment | added | Chris Davies |
"Where do I execute that command" - in a shell - in a terminal session. (It will fail under cron because % is a special character there)
|
|
Jan 26 at 0:54 | history | edited | Giacomo1968 | CC BY-SA 4.0 |
edited body
|
Jan 26 at 0:53 | history | edited | Clint William Theron | CC BY-SA 4.0 |
I added the php code how I got the different time
|
Jan 26 at 0:44 | comment | added | Clint William Theron | How do I see what timezone crontab is configured to use? I have a shared server and use cpanel 110.0.20 | |
Jan 26 at 0:42 | comment | added | Clint William Theron | Your first comment is helpful. Where do I execute that command? I tried in cronjob and got email with: /usr/local/cpanel/bin/jailshell: -c: line 0: unexpected EOF while looking for matching `'' /usr/local/cpanel/bin/jailshell: -c: line 1: syntax error: unexpected end of file. | |
Jan 25 at 23:39 | comment | added | Chris Davies |
What does the following command produce on your system, please: date; date +'%Z %z'; date --utc . I'm also wondering what timezone your crontab is configured to use
|
|
Jan 25 at 23:36 | comment | added | Chris Davies |
Note that although it doesn't address your pre-start concern, * 22-23 * * * is actually two hours and should run from 22:00 to 23:59 inclusive
|
|
Jan 25 at 23:34 | history | edited | Giacomo1968 | CC BY-SA 4.0 |
Copy edits.
|
Jan 25 at 23:30 | history | edited | Clint William Theron | CC BY-SA 4.0 |
corrected typos
|
Jan 25 at 23:23 | history | edited | Clint William Theron |
added one more tag to be more specific
|
|
S Jan 25 at 23:18 | review | First questions | |||
Jan 25 at 23:31 | |||||
S Jan 25 at 23:18 | history | asked | Clint William Theron | CC BY-SA 4.0 |