Why does Magento 2.1.2 cron:run gives Undefined index: jobs?












1















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









share|improve this question

























  • 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 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
















1















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









share|improve this question

























  • 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 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














1












1








1








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









share|improve this question
















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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 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 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



















  • 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 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

















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










4 Answers
4






active

oldest

votes


















11














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.






share|improve this answer































    2














    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.






    share|improve this answer































      0














      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.






      share|improve this answer





















      • 1





        There is nothing in cron_schedule

        – Stevie G
        Nov 14 '16 at 5:59



















      0














      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.





      share








      New contributor




      Andy Kim Long is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




















        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
        });


        }
        });














        draft saved

        draft discarded


















        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









        11














        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.






        share|improve this answer




























          11














          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.






          share|improve this answer


























            11












            11








            11







            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.






            share|improve this answer













            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.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Feb 14 '17 at 11:04









            rcasonrcason

            15614




            15614

























                2














                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.






                share|improve this answer




























                  2














                  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.






                  share|improve this answer


























                    2












                    2








                    2







                    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.






                    share|improve this answer













                    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.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered May 29 '18 at 22:42









                    IsaacIsaac

                    211




                    211























                        0














                        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.






                        share|improve this answer





















                        • 1





                          There is nothing in cron_schedule

                          – Stevie G
                          Nov 14 '16 at 5:59
















                        0














                        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.






                        share|improve this answer





















                        • 1





                          There is nothing in cron_schedule

                          – Stevie G
                          Nov 14 '16 at 5:59














                        0












                        0








                        0







                        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.






                        share|improve this answer















                        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.







                        share|improve this answer














                        share|improve this answer



                        share|improve this answer








                        edited Nov 11 '16 at 14:09

























                        answered Nov 11 '16 at 14:00









                        KAndyKAndy

                        15.4k23044




                        15.4k23044








                        • 1





                          There is nothing in cron_schedule

                          – Stevie G
                          Nov 14 '16 at 5:59














                        • 1





                          There is nothing in cron_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











                        0














                        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.





                        share








                        New contributor




                        Andy Kim Long is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                        Check out our Code of Conduct.

























                          0














                          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.





                          share








                          New contributor




                          Andy Kim Long is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.























                            0












                            0








                            0







                            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.





                            share








                            New contributor




                            Andy Kim Long is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                            Check out our Code of Conduct.










                            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.






                            share








                            New contributor




                            Andy Kim Long is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                            Check out our Code of Conduct.








                            share


                            share






                            New contributor




                            Andy Kim Long is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                            Check out our Code of Conduct.









                            answered 4 mins ago









                            Andy Kim LongAndy Kim Long

                            1




                            1




                            New contributor




                            Andy Kim Long is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                            Check out our Code of Conduct.





                            New contributor





                            Andy Kim Long is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                            Check out our Code of Conduct.






                            Andy Kim Long is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                            Check out our Code of Conduct.






























                                draft saved

                                draft discarded




















































                                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.




                                draft saved


                                draft discarded














                                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





















































                                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







                                Popular posts from this blog

                                Magento 2 controller redirect on button click in phtml file

                                Polycentropodidae