Cronjob is running every minute but not at a specific time
The job works if set like this:
*/1 * * * * /usr/bin/php /home/test/cron/test.php
And if set to something like:
15 20 * * * /usr/bin/php /home/test/cron/test.php
it's not working.
[root@localhost mail]# uname -or
2.6.18-308.el5 GNU/Linux
[root@localhost mail]# cat /etc/*elease
#CentOS release 5.8 (Final)
redhat-4
I don't know if this going to help but when I do this:
[root@localhost mail]# date
Wed Aug 5 20:54:02 KST 2015
and when an email comes the date is displayed like so:
Wed Aug 5 06:51:01 2015
which is actually one hour behind the time.
The date was showing up EDT
instead of KST
, so I changed etc/profile
but the cron job still wouldn't work.
I'm new to linux and don't really know what info would be useful, so I can provide more on your request.
Hope you can help me.
cron timezone
add a comment |
The job works if set like this:
*/1 * * * * /usr/bin/php /home/test/cron/test.php
And if set to something like:
15 20 * * * /usr/bin/php /home/test/cron/test.php
it's not working.
[root@localhost mail]# uname -or
2.6.18-308.el5 GNU/Linux
[root@localhost mail]# cat /etc/*elease
#CentOS release 5.8 (Final)
redhat-4
I don't know if this going to help but when I do this:
[root@localhost mail]# date
Wed Aug 5 20:54:02 KST 2015
and when an email comes the date is displayed like so:
Wed Aug 5 06:51:01 2015
which is actually one hour behind the time.
The date was showing up EDT
instead of KST
, so I changed etc/profile
but the cron job still wouldn't work.
I'm new to linux and don't really know what info would be useful, so I can provide more on your request.
Hope you can help me.
cron timezone
1
first read the man page for cron. Because the second option means: at 20.15 of everyday run the job.
– BitsOfNix
Aug 5 '15 at 12:37
1
When/how often do you want the cronjob to take place? The cron syntax isMin Hour Day Month 'Day of Week'
see en.wikipedia.org/wiki/Cron#Examples
– Centimane
Aug 5 '15 at 12:44
I want to run at noon, but since I can't wait one day to test I set to something like 5 minutes in the future. it's correct in this example i was trying to run it at 20:15 KST everyday. Do you have any ideas what maybe the problem ?
– Cԃաԃ
Aug 5 '15 at 12:55
add a comment |
The job works if set like this:
*/1 * * * * /usr/bin/php /home/test/cron/test.php
And if set to something like:
15 20 * * * /usr/bin/php /home/test/cron/test.php
it's not working.
[root@localhost mail]# uname -or
2.6.18-308.el5 GNU/Linux
[root@localhost mail]# cat /etc/*elease
#CentOS release 5.8 (Final)
redhat-4
I don't know if this going to help but when I do this:
[root@localhost mail]# date
Wed Aug 5 20:54:02 KST 2015
and when an email comes the date is displayed like so:
Wed Aug 5 06:51:01 2015
which is actually one hour behind the time.
The date was showing up EDT
instead of KST
, so I changed etc/profile
but the cron job still wouldn't work.
I'm new to linux and don't really know what info would be useful, so I can provide more on your request.
Hope you can help me.
cron timezone
The job works if set like this:
*/1 * * * * /usr/bin/php /home/test/cron/test.php
And if set to something like:
15 20 * * * /usr/bin/php /home/test/cron/test.php
it's not working.
[root@localhost mail]# uname -or
2.6.18-308.el5 GNU/Linux
[root@localhost mail]# cat /etc/*elease
#CentOS release 5.8 (Final)
redhat-4
I don't know if this going to help but when I do this:
[root@localhost mail]# date
Wed Aug 5 20:54:02 KST 2015
and when an email comes the date is displayed like so:
Wed Aug 5 06:51:01 2015
which is actually one hour behind the time.
The date was showing up EDT
instead of KST
, so I changed etc/profile
but the cron job still wouldn't work.
I'm new to linux and don't really know what info would be useful, so I can provide more on your request.
Hope you can help me.
cron timezone
cron timezone
edited 4 hours ago
Rui F Ribeiro
40.5k1479137
40.5k1479137
asked Aug 5 '15 at 12:02
CԃաԃCԃաԃ
1085
1085
1
first read the man page for cron. Because the second option means: at 20.15 of everyday run the job.
– BitsOfNix
Aug 5 '15 at 12:37
1
When/how often do you want the cronjob to take place? The cron syntax isMin Hour Day Month 'Day of Week'
see en.wikipedia.org/wiki/Cron#Examples
– Centimane
Aug 5 '15 at 12:44
I want to run at noon, but since I can't wait one day to test I set to something like 5 minutes in the future. it's correct in this example i was trying to run it at 20:15 KST everyday. Do you have any ideas what maybe the problem ?
– Cԃաԃ
Aug 5 '15 at 12:55
add a comment |
1
first read the man page for cron. Because the second option means: at 20.15 of everyday run the job.
– BitsOfNix
Aug 5 '15 at 12:37
1
When/how often do you want the cronjob to take place? The cron syntax isMin Hour Day Month 'Day of Week'
see en.wikipedia.org/wiki/Cron#Examples
– Centimane
Aug 5 '15 at 12:44
I want to run at noon, but since I can't wait one day to test I set to something like 5 minutes in the future. it's correct in this example i was trying to run it at 20:15 KST everyday. Do you have any ideas what maybe the problem ?
– Cԃաԃ
Aug 5 '15 at 12:55
1
1
first read the man page for cron. Because the second option means: at 20.15 of everyday run the job.
– BitsOfNix
Aug 5 '15 at 12:37
first read the man page for cron. Because the second option means: at 20.15 of everyday run the job.
– BitsOfNix
Aug 5 '15 at 12:37
1
1
When/how often do you want the cronjob to take place? The cron syntax is
Min Hour Day Month 'Day of Week'
see en.wikipedia.org/wiki/Cron#Examples– Centimane
Aug 5 '15 at 12:44
When/how often do you want the cronjob to take place? The cron syntax is
Min Hour Day Month 'Day of Week'
see en.wikipedia.org/wiki/Cron#Examples– Centimane
Aug 5 '15 at 12:44
I want to run at noon, but since I can't wait one day to test I set to something like 5 minutes in the future. it's correct in this example i was trying to run it at 20:15 KST everyday. Do you have any ideas what maybe the problem ?
– Cԃաԃ
Aug 5 '15 at 12:55
I want to run at noon, but since I can't wait one day to test I set to something like 5 minutes in the future. it's correct in this example i was trying to run it at 20:15 KST everyday. Do you have any ideas what maybe the problem ?
– Cԃաԃ
Aug 5 '15 at 12:55
add a comment |
1 Answer
1
active
oldest
votes
Updating /etc/localtime
for the system wide time zone setting might fix your problem. I guess KST
stands for Korea Standard Time, so you might want to choose /usr/share/zoneinfo/Asia/Seoul
for it. You can also run tzselect
to know which file in /usr/share/zoneinfo
to choose.
$ sudo cp /etc/localtime /etc/localtime.orig # for backup
$ sudo cp /usr/share/zoneinfo/Asia/Seoul /etc/localtime
$ date
Wed Aug 5 21:50:23 KST 2015
Then restart cron
, or reboot your server.
Thank you very much Yaegashi ^_^. It was exactly the problem. You should go and answer dozens of other similar questions and collect the loot :).
– Cԃաԃ
Aug 5 '15 at 13:17
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f220319%2fcronjob-is-running-every-minute-but-not-at-a-specific-time%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Updating /etc/localtime
for the system wide time zone setting might fix your problem. I guess KST
stands for Korea Standard Time, so you might want to choose /usr/share/zoneinfo/Asia/Seoul
for it. You can also run tzselect
to know which file in /usr/share/zoneinfo
to choose.
$ sudo cp /etc/localtime /etc/localtime.orig # for backup
$ sudo cp /usr/share/zoneinfo/Asia/Seoul /etc/localtime
$ date
Wed Aug 5 21:50:23 KST 2015
Then restart cron
, or reboot your server.
Thank you very much Yaegashi ^_^. It was exactly the problem. You should go and answer dozens of other similar questions and collect the loot :).
– Cԃաԃ
Aug 5 '15 at 13:17
add a comment |
Updating /etc/localtime
for the system wide time zone setting might fix your problem. I guess KST
stands for Korea Standard Time, so you might want to choose /usr/share/zoneinfo/Asia/Seoul
for it. You can also run tzselect
to know which file in /usr/share/zoneinfo
to choose.
$ sudo cp /etc/localtime /etc/localtime.orig # for backup
$ sudo cp /usr/share/zoneinfo/Asia/Seoul /etc/localtime
$ date
Wed Aug 5 21:50:23 KST 2015
Then restart cron
, or reboot your server.
Thank you very much Yaegashi ^_^. It was exactly the problem. You should go and answer dozens of other similar questions and collect the loot :).
– Cԃաԃ
Aug 5 '15 at 13:17
add a comment |
Updating /etc/localtime
for the system wide time zone setting might fix your problem. I guess KST
stands for Korea Standard Time, so you might want to choose /usr/share/zoneinfo/Asia/Seoul
for it. You can also run tzselect
to know which file in /usr/share/zoneinfo
to choose.
$ sudo cp /etc/localtime /etc/localtime.orig # for backup
$ sudo cp /usr/share/zoneinfo/Asia/Seoul /etc/localtime
$ date
Wed Aug 5 21:50:23 KST 2015
Then restart cron
, or reboot your server.
Updating /etc/localtime
for the system wide time zone setting might fix your problem. I guess KST
stands for Korea Standard Time, so you might want to choose /usr/share/zoneinfo/Asia/Seoul
for it. You can also run tzselect
to know which file in /usr/share/zoneinfo
to choose.
$ sudo cp /etc/localtime /etc/localtime.orig # for backup
$ sudo cp /usr/share/zoneinfo/Asia/Seoul /etc/localtime
$ date
Wed Aug 5 21:50:23 KST 2015
Then restart cron
, or reboot your server.
answered Aug 5 '15 at 12:54
yaegashiyaegashi
8,38611734
8,38611734
Thank you very much Yaegashi ^_^. It was exactly the problem. You should go and answer dozens of other similar questions and collect the loot :).
– Cԃաԃ
Aug 5 '15 at 13:17
add a comment |
Thank you very much Yaegashi ^_^. It was exactly the problem. You should go and answer dozens of other similar questions and collect the loot :).
– Cԃաԃ
Aug 5 '15 at 13:17
Thank you very much Yaegashi ^_^. It was exactly the problem. You should go and answer dozens of other similar questions and collect the loot :).
– Cԃաԃ
Aug 5 '15 at 13:17
Thank you very much Yaegashi ^_^. It was exactly the problem. You should go and answer dozens of other similar questions and collect the loot :).
– Cԃաԃ
Aug 5 '15 at 13:17
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f220319%2fcronjob-is-running-every-minute-but-not-at-a-specific-time%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
first read the man page for cron. Because the second option means: at 20.15 of everyday run the job.
– BitsOfNix
Aug 5 '15 at 12:37
1
When/how often do you want the cronjob to take place? The cron syntax is
Min Hour Day Month 'Day of Week'
see en.wikipedia.org/wiki/Cron#Examples– Centimane
Aug 5 '15 at 12:44
I want to run at noon, but since I can't wait one day to test I set to something like 5 minutes in the future. it's correct in this example i was trying to run it at 20:15 KST everyday. Do you have any ideas what maybe the problem ?
– Cԃաԃ
Aug 5 '15 at 12:55