magento2-CronjobManager
magento2-CronjobManager copied to clipboard
Improve UI to enable/disable cronjobs
Is your feature request related to a problem? Please describe. Currently, cronjobs can be disabled by configuring an empty schedule. This is not obvious.
Describe the solution you'd like Add a column to the grid with red and green "Enabled"/"Disabled". In the form, use a checkbox.
work in progress. current state:
- [ADD] Status(is_active) to grid and cron edit
- [ADD] new actions enable & disable in grid todo:
- write tests
- handle enabling crons without default frequency
@tbaden where can we find this WIP? Since this issue is years old, I'm guessing the code won't be that relevant anymore, but I'd like to work on this to improve it like @schmengler suggested.
We used to use the Kiwicommerce one and that has/had this functionality. It would be fairly easy to port it: https://github.com/kiwicommerce/magento2-cron-scheduler/blob/master/Model/Job.php#L130
Ok this was actually a lot easier than thought, I could re-use a bunch of code.
Disabling was just setting the cron expression to empty, and re-enabling it is basically thesame as restoring to system defaults.
See #202
One thing I found is that because of the custom renderer I added to show disabled jobs, it now shows certain jobs as disabled but they aren't. That is because of #201. So we should actually fix and merge that one before merging this.
Edit; also fixed in #203
This has been implemented in https://github.com/Ethan3600/magento2-CronjobManager/pull/202 which landed in v2.2.0