Why does Magento 2.1.2 cron:run gives Undefined index: jobs?
When running:
/usr/bin/php /var/www/magento2/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /var/www/magento2/var/log/magento.cron.log
I get:
[Exception]
Notice: Undefined index: jobs in /home/ubuntu/repo/project/vendor/magento/
module-cron/Model/Config/Converter/Db.php on line 39
magento2 cron
add a comment |
When running:
/usr/bin/php /var/www/magento2/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /var/www/magento2/var/log/magento.cron.log
I get:
[Exception]
Notice: Undefined index: jobs in /home/ubuntu/repo/project/vendor/magento/
module-cron/Model/Config/Converter/Db.php on line 39
magento2 cron
What does cron log says?
– Aivis Zvezdovs
Nov 11 '16 at 13:52
There is an error inupdate.log
:setup-cron.ERROR: Database 'my-db' does not exist or specified database server user does not have privileges to access this database.
– Stevie G
Nov 14 '16 at 6:03
So issue was that the data migration tool added cron entries at the wrong level: so diddelete from core_config_data where path like 'crontab/jobs%';
community.magento.com/t5/Technical-Issues/…
– Stevie G
Nov 14 '16 at 6:28
Fixed the first issue but now runningphp /var/www/shootingstuff/update/cron.php
givesPHP Warning: require_once(/dir/update/vendor/autoload.php): failed to open stream: No such file or directory in /dir/update/app/bootstrap.php on line 15 PHP Fatal error: require_once(): Failed opening required '/dir/update/vendor/autoload.php' (include_path='.:/usr/share/php') in /dir/update/app/bootstrap.php on line 15
– Stevie G
Nov 14 '16 at 6:34
add a comment |
When running:
/usr/bin/php /var/www/magento2/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /var/www/magento2/var/log/magento.cron.log
I get:
[Exception]
Notice: Undefined index: jobs in /home/ubuntu/repo/project/vendor/magento/
module-cron/Model/Config/Converter/Db.php on line 39
magento2 cron
When running:
/usr/bin/php /var/www/magento2/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /var/www/magento2/var/log/magento.cron.log
I get:
[Exception]
Notice: Undefined index: jobs in /home/ubuntu/repo/project/vendor/magento/
module-cron/Model/Config/Converter/Db.php on line 39
magento2 cron
magento2 cron
edited Dec 7 '16 at 7:52
Klettseb
3,05031651
3,05031651
asked Nov 11 '16 at 13:50
Stevie GStevie G
305625
305625
What does cron log says?
– Aivis Zvezdovs
Nov 11 '16 at 13:52
There is an error inupdate.log
:setup-cron.ERROR: Database 'my-db' does not exist or specified database server user does not have privileges to access this database.
– Stevie G
Nov 14 '16 at 6:03
So issue was that the data migration tool added cron entries at the wrong level: so diddelete from core_config_data where path like 'crontab/jobs%';
community.magento.com/t5/Technical-Issues/…
– Stevie G
Nov 14 '16 at 6:28
Fixed the first issue but now runningphp /var/www/shootingstuff/update/cron.php
givesPHP Warning: require_once(/dir/update/vendor/autoload.php): failed to open stream: No such file or directory in /dir/update/app/bootstrap.php on line 15 PHP Fatal error: require_once(): Failed opening required '/dir/update/vendor/autoload.php' (include_path='.:/usr/share/php') in /dir/update/app/bootstrap.php on line 15
– Stevie G
Nov 14 '16 at 6:34
add a comment |
What does cron log says?
– Aivis Zvezdovs
Nov 11 '16 at 13:52
There is an error inupdate.log
:setup-cron.ERROR: Database 'my-db' does not exist or specified database server user does not have privileges to access this database.
– Stevie G
Nov 14 '16 at 6:03
So issue was that the data migration tool added cron entries at the wrong level: so diddelete from core_config_data where path like 'crontab/jobs%';
community.magento.com/t5/Technical-Issues/…
– Stevie G
Nov 14 '16 at 6:28
Fixed the first issue but now runningphp /var/www/shootingstuff/update/cron.php
givesPHP Warning: require_once(/dir/update/vendor/autoload.php): failed to open stream: No such file or directory in /dir/update/app/bootstrap.php on line 15 PHP Fatal error: require_once(): Failed opening required '/dir/update/vendor/autoload.php' (include_path='.:/usr/share/php') in /dir/update/app/bootstrap.php on line 15
– Stevie G
Nov 14 '16 at 6:34
What does cron log says?
– Aivis Zvezdovs
Nov 11 '16 at 13:52
What does cron log says?
– Aivis Zvezdovs
Nov 11 '16 at 13:52
There is an error in
update.log
: setup-cron.ERROR: Database 'my-db' does not exist or specified database server user does not have privileges to access this database.
– Stevie G
Nov 14 '16 at 6:03
There is an error in
update.log
: setup-cron.ERROR: Database 'my-db' does not exist or specified database server user does not have privileges to access this database.
– Stevie G
Nov 14 '16 at 6:03
So issue was that the data migration tool added cron entries at the wrong level: so did
delete from core_config_data where path like 'crontab/jobs%';
community.magento.com/t5/Technical-Issues/…– Stevie G
Nov 14 '16 at 6:28
So issue was that the data migration tool added cron entries at the wrong level: so did
delete from core_config_data where path like 'crontab/jobs%';
community.magento.com/t5/Technical-Issues/…– Stevie G
Nov 14 '16 at 6:28
Fixed the first issue but now running
php /var/www/shootingstuff/update/cron.php
gives PHP Warning: require_once(/dir/update/vendor/autoload.php): failed to open stream: No such file or directory in /dir/update/app/bootstrap.php on line 15 PHP Fatal error: require_once(): Failed opening required '/dir/update/vendor/autoload.php' (include_path='.:/usr/share/php') in /dir/update/app/bootstrap.php on line 15
– Stevie G
Nov 14 '16 at 6:34
Fixed the first issue but now running
php /var/www/shootingstuff/update/cron.php
gives PHP Warning: require_once(/dir/update/vendor/autoload.php): failed to open stream: No such file or directory in /dir/update/app/bootstrap.php on line 15 PHP Fatal error: require_once(): Failed opening required '/dir/update/vendor/autoload.php' (include_path='.:/usr/share/php') in /dir/update/app/bootstrap.php on line 15
– Stevie G
Nov 14 '16 at 6:34
add a comment |
4 Answers
4
active
oldest
votes
In my case it was caused by some cron jobs migrated from Magento 1, in core_config_data
.
Magento 2 expects the format to be crontab/{groupname}/jobs/{code}
, while the imported ones miss the group name (i.e. default).
If that is your case you might want to delete the wrong entries in core_config_data
, or update them to map the new cron jobs.
add a comment |
As rcason said: this issue is due to migration from Magento 1 to Magento 2. After removing from "core _config_data" all the values that starts with crontab/default... (under Config Path) the problem is solved, and M2 cron jobs now run with no issue.
add a comment |
Looks like you have the wrong format of cron configuration in database.
Try cleanup cron_schedule
table and try run cron again.
Also please check cron setting in system configuration.
1
There is nothing incron_schedule
– Stevie G
Nov 14 '16 at 5:59
add a comment |
I have the same error. This is the error when migration from Magento 1 to Magento 2. So I fixed it by remove all rows have "path" start by "crobtab" in table "core_config_data".
Then run this:
php bin/magento setup:upgrade
And error fixed. Magento 2 will generate all cronjobs again.
New contributor
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%2f145349%2fwhy-does-magento-2-1-2-cronrun-gives-undefined-index-jobs%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
In my case it was caused by some cron jobs migrated from Magento 1, in core_config_data
.
Magento 2 expects the format to be crontab/{groupname}/jobs/{code}
, while the imported ones miss the group name (i.e. default).
If that is your case you might want to delete the wrong entries in core_config_data
, or update them to map the new cron jobs.
add a comment |
In my case it was caused by some cron jobs migrated from Magento 1, in core_config_data
.
Magento 2 expects the format to be crontab/{groupname}/jobs/{code}
, while the imported ones miss the group name (i.e. default).
If that is your case you might want to delete the wrong entries in core_config_data
, or update them to map the new cron jobs.
add a comment |
In my case it was caused by some cron jobs migrated from Magento 1, in core_config_data
.
Magento 2 expects the format to be crontab/{groupname}/jobs/{code}
, while the imported ones miss the group name (i.e. default).
If that is your case you might want to delete the wrong entries in core_config_data
, or update them to map the new cron jobs.
In my case it was caused by some cron jobs migrated from Magento 1, in core_config_data
.
Magento 2 expects the format to be crontab/{groupname}/jobs/{code}
, while the imported ones miss the group name (i.e. default).
If that is your case you might want to delete the wrong entries in core_config_data
, or update them to map the new cron jobs.
answered Feb 14 '17 at 11:04
rcasonrcason
15614
15614
add a comment |
add a comment |
As rcason said: this issue is due to migration from Magento 1 to Magento 2. After removing from "core _config_data" all the values that starts with crontab/default... (under Config Path) the problem is solved, and M2 cron jobs now run with no issue.
add a comment |
As rcason said: this issue is due to migration from Magento 1 to Magento 2. After removing from "core _config_data" all the values that starts with crontab/default... (under Config Path) the problem is solved, and M2 cron jobs now run with no issue.
add a comment |
As rcason said: this issue is due to migration from Magento 1 to Magento 2. After removing from "core _config_data" all the values that starts with crontab/default... (under Config Path) the problem is solved, and M2 cron jobs now run with no issue.
As rcason said: this issue is due to migration from Magento 1 to Magento 2. After removing from "core _config_data" all the values that starts with crontab/default... (under Config Path) the problem is solved, and M2 cron jobs now run with no issue.
answered May 29 '18 at 22:42
IsaacIsaac
211
211
add a comment |
add a comment |
Looks like you have the wrong format of cron configuration in database.
Try cleanup cron_schedule
table and try run cron again.
Also please check cron setting in system configuration.
1
There is nothing incron_schedule
– Stevie G
Nov 14 '16 at 5:59
add a comment |
Looks like you have the wrong format of cron configuration in database.
Try cleanup cron_schedule
table and try run cron again.
Also please check cron setting in system configuration.
1
There is nothing incron_schedule
– Stevie G
Nov 14 '16 at 5:59
add a comment |
Looks like you have the wrong format of cron configuration in database.
Try cleanup cron_schedule
table and try run cron again.
Also please check cron setting in system configuration.
Looks like you have the wrong format of cron configuration in database.
Try cleanup cron_schedule
table and try run cron again.
Also please check cron setting in system configuration.
edited Nov 11 '16 at 14:09
answered Nov 11 '16 at 14:00
KAndyKAndy
15.4k23044
15.4k23044
1
There is nothing incron_schedule
– Stevie G
Nov 14 '16 at 5:59
add a comment |
1
There is nothing incron_schedule
– Stevie G
Nov 14 '16 at 5:59
1
1
There is nothing in
cron_schedule
– Stevie G
Nov 14 '16 at 5:59
There is nothing in
cron_schedule
– Stevie G
Nov 14 '16 at 5:59
add a comment |
I have the same error. This is the error when migration from Magento 1 to Magento 2. So I fixed it by remove all rows have "path" start by "crobtab" in table "core_config_data".
Then run this:
php bin/magento setup:upgrade
And error fixed. Magento 2 will generate all cronjobs again.
New contributor
add a comment |
I have the same error. This is the error when migration from Magento 1 to Magento 2. So I fixed it by remove all rows have "path" start by "crobtab" in table "core_config_data".
Then run this:
php bin/magento setup:upgrade
And error fixed. Magento 2 will generate all cronjobs again.
New contributor
add a comment |
I have the same error. This is the error when migration from Magento 1 to Magento 2. So I fixed it by remove all rows have "path" start by "crobtab" in table "core_config_data".
Then run this:
php bin/magento setup:upgrade
And error fixed. Magento 2 will generate all cronjobs again.
New contributor
I have the same error. This is the error when migration from Magento 1 to Magento 2. So I fixed it by remove all rows have "path" start by "crobtab" in table "core_config_data".
Then run this:
php bin/magento setup:upgrade
And error fixed. Magento 2 will generate all cronjobs again.
New contributor
New contributor
answered 4 mins ago
Andy Kim LongAndy Kim Long
1
1
New contributor
New contributor
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%2f145349%2fwhy-does-magento-2-1-2-cronrun-gives-undefined-index-jobs%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
What does cron log says?
– Aivis Zvezdovs
Nov 11 '16 at 13:52
There is an error in
update.log
:setup-cron.ERROR: Database 'my-db' does not exist or specified database server user does not have privileges to access this database.
– Stevie G
Nov 14 '16 at 6:03
So issue was that the data migration tool added cron entries at the wrong level: so did
delete from core_config_data where path like 'crontab/jobs%';
community.magento.com/t5/Technical-Issues/…– Stevie G
Nov 14 '16 at 6:28
Fixed the first issue but now running
php /var/www/shootingstuff/update/cron.php
givesPHP Warning: require_once(/dir/update/vendor/autoload.php): failed to open stream: No such file or directory in /dir/update/app/bootstrap.php on line 15 PHP Fatal error: require_once(): Failed opening required '/dir/update/vendor/autoload.php' (include_path='.:/usr/share/php') in /dir/update/app/bootstrap.php on line 15
– Stevie G
Nov 14 '16 at 6:34