magento2-CronjobManager icon indicating copy to clipboard operation
magento2-CronjobManager copied to clipboard

Improve UI to enable/disable cronjobs

Open schmengler opened this issue 6 years ago • 1 comments
trafficstars

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.

schmengler avatar Feb 09 '19 12:02 schmengler

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 avatar Feb 10 '19 13:02 tbaden

@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

peterjaap avatar Nov 20 '23 12:11 peterjaap

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

peterjaap avatar Nov 20 '23 20:11 peterjaap

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

peterjaap avatar Nov 20 '23 20:11 peterjaap

This has been implemented in https://github.com/Ethan3600/magento2-CronjobManager/pull/202 which landed in v2.2.0

fredden avatar Dec 28 '23 09:12 fredden