How can I check Cronjob is working and make it work?
I setup cronjob on server's crontab
*/5 * * * * /home/users/mydomain/www/cron.php >> /home/users/mydomain/www/var/log/cron.log 2>&1
30 3 * * * php /home/users/mydomain/www/shell/indexer.php --reindex catalog_url
it seems working on server
[root@ /var/log]# grep '/home/users/mydomain/www/cron.php' cron
May 10 16:00:01 crond[21592]: (root) CMD (/home/users/mydomain/www/cron.php >> /home/users/mydomain/www/var/log/cron.log 2>&1)
May 10 16:05:01 crond[21718]: (root) CMD (/home/users/mydomain/www/cron.php >> /home/users/mydomain/www/var/log/cron.log 2>&1)
May 10 16:10:01 crond[21766]: (root) CMD (/home/users/mydomain/www/cron.php >> /home/users/mydomain/www/var/log/cron.log 2>&1)
but when I check the cron scheduler module I can see that cronjob is not working
Last heartbeat is older than one hour. Please check your settings and
your configuration!
Both cronjob and scheduler works well before I moved my all files to other folders
How can I check Cronjob is working and make it work?
cron
add a comment |
I setup cronjob on server's crontab
*/5 * * * * /home/users/mydomain/www/cron.php >> /home/users/mydomain/www/var/log/cron.log 2>&1
30 3 * * * php /home/users/mydomain/www/shell/indexer.php --reindex catalog_url
it seems working on server
[root@ /var/log]# grep '/home/users/mydomain/www/cron.php' cron
May 10 16:00:01 crond[21592]: (root) CMD (/home/users/mydomain/www/cron.php >> /home/users/mydomain/www/var/log/cron.log 2>&1)
May 10 16:05:01 crond[21718]: (root) CMD (/home/users/mydomain/www/cron.php >> /home/users/mydomain/www/var/log/cron.log 2>&1)
May 10 16:10:01 crond[21766]: (root) CMD (/home/users/mydomain/www/cron.php >> /home/users/mydomain/www/var/log/cron.log 2>&1)
but when I check the cron scheduler module I can see that cronjob is not working
Last heartbeat is older than one hour. Please check your settings and
your configuration!
Both cronjob and scheduler works well before I moved my all files to other folders
How can I check Cronjob is working and make it work?
cron
This might help you out. help.sweettoothrewards.com/article/…
– Sukeshini
May 11 '15 at 1:57
1
Possible duplicate of How to run cron job
– Teja Bhagavan Kollepara
Sep 27 '16 at 10:14
add a comment |
I setup cronjob on server's crontab
*/5 * * * * /home/users/mydomain/www/cron.php >> /home/users/mydomain/www/var/log/cron.log 2>&1
30 3 * * * php /home/users/mydomain/www/shell/indexer.php --reindex catalog_url
it seems working on server
[root@ /var/log]# grep '/home/users/mydomain/www/cron.php' cron
May 10 16:00:01 crond[21592]: (root) CMD (/home/users/mydomain/www/cron.php >> /home/users/mydomain/www/var/log/cron.log 2>&1)
May 10 16:05:01 crond[21718]: (root) CMD (/home/users/mydomain/www/cron.php >> /home/users/mydomain/www/var/log/cron.log 2>&1)
May 10 16:10:01 crond[21766]: (root) CMD (/home/users/mydomain/www/cron.php >> /home/users/mydomain/www/var/log/cron.log 2>&1)
but when I check the cron scheduler module I can see that cronjob is not working
Last heartbeat is older than one hour. Please check your settings and
your configuration!
Both cronjob and scheduler works well before I moved my all files to other folders
How can I check Cronjob is working and make it work?
cron
I setup cronjob on server's crontab
*/5 * * * * /home/users/mydomain/www/cron.php >> /home/users/mydomain/www/var/log/cron.log 2>&1
30 3 * * * php /home/users/mydomain/www/shell/indexer.php --reindex catalog_url
it seems working on server
[root@ /var/log]# grep '/home/users/mydomain/www/cron.php' cron
May 10 16:00:01 crond[21592]: (root) CMD (/home/users/mydomain/www/cron.php >> /home/users/mydomain/www/var/log/cron.log 2>&1)
May 10 16:05:01 crond[21718]: (root) CMD (/home/users/mydomain/www/cron.php >> /home/users/mydomain/www/var/log/cron.log 2>&1)
May 10 16:10:01 crond[21766]: (root) CMD (/home/users/mydomain/www/cron.php >> /home/users/mydomain/www/var/log/cron.log 2>&1)
but when I check the cron scheduler module I can see that cronjob is not working
Last heartbeat is older than one hour. Please check your settings and
your configuration!
Both cronjob and scheduler works well before I moved my all files to other folders
How can I check Cronjob is working and make it work?
cron
cron
asked May 11 '15 at 0:45
MoonMoon
73672243
73672243
This might help you out. help.sweettoothrewards.com/article/…
– Sukeshini
May 11 '15 at 1:57
1
Possible duplicate of How to run cron job
– Teja Bhagavan Kollepara
Sep 27 '16 at 10:14
add a comment |
This might help you out. help.sweettoothrewards.com/article/…
– Sukeshini
May 11 '15 at 1:57
1
Possible duplicate of How to run cron job
– Teja Bhagavan Kollepara
Sep 27 '16 at 10:14
This might help you out. help.sweettoothrewards.com/article/…
– Sukeshini
May 11 '15 at 1:57
This might help you out. help.sweettoothrewards.com/article/…
– Sukeshini
May 11 '15 at 1:57
1
1
Possible duplicate of How to run cron job
– Teja Bhagavan Kollepara
Sep 27 '16 at 10:14
Possible duplicate of How to run cron job
– Teja Bhagavan Kollepara
Sep 27 '16 at 10:14
add a comment |
4 Answers
4
active
oldest
votes
Take a view to your MySQL Database > table cron_schedule
. There are all magento created jobs with timestamp of creation, scheduled, executed and their status.
If anything wrong, then look for the cron job in the table and see if there is any log in the messages
column.
add a comment |
*/5 * * * * sh /home/users/mydomain/www/cron.sh >> /home/users/mydomain/www/var/log/cron.log 2>&1
Use cron.sh, not cron.php, which you will need php for.
This makes more sense to me than using cron.php, working on this now, I'll let you know if it works!
– dustbuster
Oct 22 '18 at 21:22
cron.sh is not supported. see: devdocs.magento.com/guides/v2.0/config-guide/cli/…
– Saturn Technologies
Nov 21 '18 at 17:53
add a comment |
First of all, check that whether your cron is scheduled or not, to check this run your cron, as cron runs it makes the entry in database, if you find that entry in your database that means your cron is scheduled correctly.
And if it is scheduled correctly but not running, in this case there may be two possibilities-
First is you may have written the wrong file path where the cron has to be run, or
You have made some mistakes on the piece of code where you have called the cron function. To check this you can apply the logger on that code to find the error that why your cron is not working. As you apply the logger, it will make a log file /var/log/ in the magento root directory through which you can find the error.
add a comment |
I am also facing same issue.Cron job is not doing its job to backup in magento2.
I have checked in cron_schedule as suggested by SFrey.Field values are
| schedule_id | job_code| status | messages| created_at| scheduled_at|executed_at| finished_at|
1318 | ddg_automation_campaign| missed | Too late for the schedule| 2019-01-17 07:52:14 | 2019-01-17 07:55:00 | NULL| NULL|
Please help me.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "479"
};
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');
var $window = $(window),
onScroll = function(e) {
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom)) {
StackExchange.using('gps', function() { StackExchange.gps.track('embedded_signup_form.view', { location: 'question_page' }); });
$window.unbind('scroll', onScroll);
}
};
$window.on('scroll', onScroll);
});
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%2fmagento.stackexchange.com%2fquestions%2f67336%2fhow-can-i-check-cronjob-is-working-and-make-it-work%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
Take a view to your MySQL Database > table cron_schedule
. There are all magento created jobs with timestamp of creation, scheduled, executed and their status.
If anything wrong, then look for the cron job in the table and see if there is any log in the messages
column.
add a comment |
Take a view to your MySQL Database > table cron_schedule
. There are all magento created jobs with timestamp of creation, scheduled, executed and their status.
If anything wrong, then look for the cron job in the table and see if there is any log in the messages
column.
add a comment |
Take a view to your MySQL Database > table cron_schedule
. There are all magento created jobs with timestamp of creation, scheduled, executed and their status.
If anything wrong, then look for the cron job in the table and see if there is any log in the messages
column.
Take a view to your MySQL Database > table cron_schedule
. There are all magento created jobs with timestamp of creation, scheduled, executed and their status.
If anything wrong, then look for the cron job in the table and see if there is any log in the messages
column.
edited Jun 19 '17 at 4:13
Fra
4,515114793
4,515114793
answered Oct 11 '15 at 17:43
SFreySFrey
1068
1068
add a comment |
add a comment |
*/5 * * * * sh /home/users/mydomain/www/cron.sh >> /home/users/mydomain/www/var/log/cron.log 2>&1
Use cron.sh, not cron.php, which you will need php for.
This makes more sense to me than using cron.php, working on this now, I'll let you know if it works!
– dustbuster
Oct 22 '18 at 21:22
cron.sh is not supported. see: devdocs.magento.com/guides/v2.0/config-guide/cli/…
– Saturn Technologies
Nov 21 '18 at 17:53
add a comment |
*/5 * * * * sh /home/users/mydomain/www/cron.sh >> /home/users/mydomain/www/var/log/cron.log 2>&1
Use cron.sh, not cron.php, which you will need php for.
This makes more sense to me than using cron.php, working on this now, I'll let you know if it works!
– dustbuster
Oct 22 '18 at 21:22
cron.sh is not supported. see: devdocs.magento.com/guides/v2.0/config-guide/cli/…
– Saturn Technologies
Nov 21 '18 at 17:53
add a comment |
*/5 * * * * sh /home/users/mydomain/www/cron.sh >> /home/users/mydomain/www/var/log/cron.log 2>&1
Use cron.sh, not cron.php, which you will need php for.
*/5 * * * * sh /home/users/mydomain/www/cron.sh >> /home/users/mydomain/www/var/log/cron.log 2>&1
Use cron.sh, not cron.php, which you will need php for.
edited May 11 '15 at 1:25
answered May 11 '15 at 1:20
AnonymousAnonymous
39917
39917
This makes more sense to me than using cron.php, working on this now, I'll let you know if it works!
– dustbuster
Oct 22 '18 at 21:22
cron.sh is not supported. see: devdocs.magento.com/guides/v2.0/config-guide/cli/…
– Saturn Technologies
Nov 21 '18 at 17:53
add a comment |
This makes more sense to me than using cron.php, working on this now, I'll let you know if it works!
– dustbuster
Oct 22 '18 at 21:22
cron.sh is not supported. see: devdocs.magento.com/guides/v2.0/config-guide/cli/…
– Saturn Technologies
Nov 21 '18 at 17:53
This makes more sense to me than using cron.php, working on this now, I'll let you know if it works!
– dustbuster
Oct 22 '18 at 21:22
This makes more sense to me than using cron.php, working on this now, I'll let you know if it works!
– dustbuster
Oct 22 '18 at 21:22
cron.sh is not supported. see: devdocs.magento.com/guides/v2.0/config-guide/cli/…
– Saturn Technologies
Nov 21 '18 at 17:53
cron.sh is not supported. see: devdocs.magento.com/guides/v2.0/config-guide/cli/…
– Saturn Technologies
Nov 21 '18 at 17:53
add a comment |
First of all, check that whether your cron is scheduled or not, to check this run your cron, as cron runs it makes the entry in database, if you find that entry in your database that means your cron is scheduled correctly.
And if it is scheduled correctly but not running, in this case there may be two possibilities-
First is you may have written the wrong file path where the cron has to be run, or
You have made some mistakes on the piece of code where you have called the cron function. To check this you can apply the logger on that code to find the error that why your cron is not working. As you apply the logger, it will make a log file /var/log/ in the magento root directory through which you can find the error.
add a comment |
First of all, check that whether your cron is scheduled or not, to check this run your cron, as cron runs it makes the entry in database, if you find that entry in your database that means your cron is scheduled correctly.
And if it is scheduled correctly but not running, in this case there may be two possibilities-
First is you may have written the wrong file path where the cron has to be run, or
You have made some mistakes on the piece of code where you have called the cron function. To check this you can apply the logger on that code to find the error that why your cron is not working. As you apply the logger, it will make a log file /var/log/ in the magento root directory through which you can find the error.
add a comment |
First of all, check that whether your cron is scheduled or not, to check this run your cron, as cron runs it makes the entry in database, if you find that entry in your database that means your cron is scheduled correctly.
And if it is scheduled correctly but not running, in this case there may be two possibilities-
First is you may have written the wrong file path where the cron has to be run, or
You have made some mistakes on the piece of code where you have called the cron function. To check this you can apply the logger on that code to find the error that why your cron is not working. As you apply the logger, it will make a log file /var/log/ in the magento root directory through which you can find the error.
First of all, check that whether your cron is scheduled or not, to check this run your cron, as cron runs it makes the entry in database, if you find that entry in your database that means your cron is scheduled correctly.
And if it is scheduled correctly but not running, in this case there may be two possibilities-
First is you may have written the wrong file path where the cron has to be run, or
You have made some mistakes on the piece of code where you have called the cron function. To check this you can apply the logger on that code to find the error that why your cron is not working. As you apply the logger, it will make a log file /var/log/ in the magento root directory through which you can find the error.
answered Jun 19 '17 at 11:50
CedCommerceCedCommerce
53239
53239
add a comment |
add a comment |
I am also facing same issue.Cron job is not doing its job to backup in magento2.
I have checked in cron_schedule as suggested by SFrey.Field values are
| schedule_id | job_code| status | messages| created_at| scheduled_at|executed_at| finished_at|
1318 | ddg_automation_campaign| missed | Too late for the schedule| 2019-01-17 07:52:14 | 2019-01-17 07:55:00 | NULL| NULL|
Please help me.
add a comment |
I am also facing same issue.Cron job is not doing its job to backup in magento2.
I have checked in cron_schedule as suggested by SFrey.Field values are
| schedule_id | job_code| status | messages| created_at| scheduled_at|executed_at| finished_at|
1318 | ddg_automation_campaign| missed | Too late for the schedule| 2019-01-17 07:52:14 | 2019-01-17 07:55:00 | NULL| NULL|
Please help me.
add a comment |
I am also facing same issue.Cron job is not doing its job to backup in magento2.
I have checked in cron_schedule as suggested by SFrey.Field values are
| schedule_id | job_code| status | messages| created_at| scheduled_at|executed_at| finished_at|
1318 | ddg_automation_campaign| missed | Too late for the schedule| 2019-01-17 07:52:14 | 2019-01-17 07:55:00 | NULL| NULL|
Please help me.
I am also facing same issue.Cron job is not doing its job to backup in magento2.
I have checked in cron_schedule as suggested by SFrey.Field values are
| schedule_id | job_code| status | messages| created_at| scheduled_at|executed_at| finished_at|
1318 | ddg_automation_campaign| missed | Too late for the schedule| 2019-01-17 07:52:14 | 2019-01-17 07:55:00 | NULL| NULL|
Please help me.
answered 20 mins ago
CharanjeetCharanjeet
133
133
add a comment |
add a comment |
Thanks for contributing an answer to Magento 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');
var $window = $(window),
onScroll = function(e) {
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom)) {
StackExchange.using('gps', function() { StackExchange.gps.track('embedded_signup_form.view', { location: 'question_page' }); });
$window.unbind('scroll', onScroll);
}
};
$window.on('scroll', onScroll);
});
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%2fmagento.stackexchange.com%2fquestions%2f67336%2fhow-can-i-check-cronjob-is-working-and-make-it-work%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');
var $window = $(window),
onScroll = function(e) {
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom)) {
StackExchange.using('gps', function() { StackExchange.gps.track('embedded_signup_form.view', { location: 'question_page' }); });
$window.unbind('scroll', onScroll);
}
};
$window.on('scroll', onScroll);
});
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');
var $window = $(window),
onScroll = function(e) {
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom)) {
StackExchange.using('gps', function() { StackExchange.gps.track('embedded_signup_form.view', { location: 'question_page' }); });
$window.unbind('scroll', onScroll);
}
};
$window.on('scroll', onScroll);
});
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');
var $window = $(window),
onScroll = function(e) {
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom)) {
StackExchange.using('gps', function() { StackExchange.gps.track('embedded_signup_form.view', { location: 'question_page' }); });
$window.unbind('scroll', onScroll);
}
};
$window.on('scroll', onScroll);
});
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
This might help you out. help.sweettoothrewards.com/article/…
– Sukeshini
May 11 '15 at 1:57
1
Possible duplicate of How to run cron job
– Teja Bhagavan Kollepara
Sep 27 '16 at 10:14