magemojo / m2-ce-cron

Magento 2 cron project to fix bugs and common cron issues.
https://magemojo.com
MIT License
165 stars 45 forks source link

scheduler is ignoring settings in Admin UI Scheduler #50

Closed marcejohnson closed 6 years ago

marcejohnson commented 6 years ago

We tested on Magento 2.2.5 and 2.1.10

What we did: Installed magemojo/m2-ce-cron, latest version

What we saw: With m2-ce-cron installed we're seeing 1 minute scheduling is occurring for all jobs and groups (we can see the schedule and execution in the cron_schedule table). The overly-frequent schedule causes misses as shown here:

screen shot 2018-08-20 at 2 52 23 pm

Expected behavior: We should see it schedule and run according to setup in Admin UI Scheduler (per group) : https://docs.magento.com/m2/ce/user_guide/system/cron.html . This is standard behavior that seems to go away with installation of m2-ce-cron. Our groups are set to 5 and 10 minutes and those are no longer being honored. Screenshot showing settings:

cron configuration magento admin ui

Here is the expected cron_schedule table schedule prior to installing m2-ce-cron showing schedule occurring in accordance with settings (without m2-ce-cron installed) :

screen shot 2018-08-21 at 2 25 10 pm
marcejohnson commented 6 years ago

One recommendation we received is to edit each crontab.xml file separately. The problem with that is there is a crontab.xml file for each module. In our case that would entail over 100 files to edit for all the built-in and vendor modules... which would get overwritten with upgrades. That is not maintainable -- instead the cron admin UI needs to be honored. The crontab module also doesn't seem to handle stuck processes. The team is uninstalling the magemojo cron module until these issues are resolved.

gnuzealot commented 6 years ago

We will build this into the next version. Although for how the extension runs many of these settings become obsolete. At first glance the "Generate Schedules Every" may be the only applicable one.