Magento2: There are no commands defined in the "setup:cron" namespace after upgrading to magento 2.4.0

Created on 2 Sep 2020  ·  15Comments  ·  Source: magento/magento2

Preconditions (*)

  1. Enterprise

Steps to reproduce (*)

  1. Upgrade from 2.3.5-p2 to 2.4.0 by using composer.
  2. Make sure that you are using at least PHP 7.3

Expected result (*)

  1. Upgrade succeeds without problems

Actual result (*)

  1. I am receiving alot of e-mails saying that a cron job failed with "There are no commands defined in the "setup:cron" namespace"
  2. Also calling php bin/magento setup:cron:run throws error:

There are no commands defined in the "setup:cron" namespace.

Did you mean one of these?
setup
setup:config
setup:db
setup:db-data
setup:db-declaration
setup:db-schema
setup:di
setup:performance
setup:static-content
setup:store-config


Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

  • [ ] Severity: S0 _- Affects critical data or functionality and leaves users without workaround._
  • [x] Severity: S1 _- Affects critical data or functionality and forces users to employ a workaround._
  • [ ] Severity: S2 _- Affects non-critical data or functionality and forces users to employ a workaround._
  • [ ] Severity: S3 _- Affects non-critical data or functionality and does not force users to employ a workaround._
  • [ ] Severity: S4 _- Affects aesthetics, professional look and feel, “quality” or “usability”._
Format is valid Reported on 2.4.0

All 15 comments

Hi @Eddcapone. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, please, review the Magento Contributor Assistant documentation.

Please, add a comment to assign the issue: @magento I am working on this


  • Join Magento Community Engineering Slack and ask your questions in #github channel.

    :warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

:clock10: You can find the schedule on the Magento Community Calendar page.

:telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.

:movie_camera: You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

Looks like they have removed the command. I deleted the cron job now the error is gone.

@Eddcapone , how do you mean "They have removed the command" . I have the message on 4 different installs.
How can I solve this as I have been looking for the source of this for some time now.

@onepack: as far as I'm aware, the setup:cron:run command was part of the web setup wizard. That thing has been removed in 2.4.0, so it's no longer needed to put the setup:cron:run call in your crontab. You can safely remove it from there if you are using Magento 2.4.0 and higher.
You can also remove the entry update/cron.php from your crontab, that appears to have been removed as well in 2.4.0.

@hostep Thank you! I was going through all modules thinking it was a bug. I was completely overlooking this part.
I adjusted the cron and got immediate result.
Cheers!

It is just sad that magento does not point this out in the changelog and leaves users confused...

Was this page helpful?
0 / 5 - 0 ratings