Magento 2: Clean Cron Via Scheduler and Terminal

Clean_cron

The first table starts filling the entry once cron is enabled in the  "cron_schedule".It's always better to clean your cron_schedule table for better website enhancement.

Hello Everyone! This is MO😉. This blog will explain how to install and use our custom module. In this module, we are clearing the crons executed successfully in the last 24 hours.

Download our plugin, Magento_CleanCrons, from Git Hub.

Setup Steps:

  • Once you have the plugin, place the module under the app/code directory.
  • Run the deployment commands. If you're a beginner at Magento, check out our blog on module creation.
  • To verify the module installation, go to app/etc/config.php and look for the module name Mohith_CleanCrons, which is set to 1.

Clean_cron_config
How to use:

  • To enable this module, login to Magento admin, then store > settings > configurations > MOHITH > Clean Crons > Set "Yes" on Module Enable.
  • Once configuration is enabled, A scheduler will be created to clear the crons that have executed successfully in the last 24 hours.
  • You can execute bin/magento mohith:clean:crons on your terminal or server terminal to clear the crons that have executed successfully in the last 24 hours. 

FAQ’s 

Is this plugin free?

Yes, you can download it from Git Hub.

Does this plugin work with Magento 2.4?

Yes, it works with Magento 2.3.x and 2.4.x versions too.

Should we need to do any configurations to run the bin/magento mohith:clean:crons command?

Nope, you don’t need to do any configuration to run this command, but you need permission to access the terminal or server terminal to execute this command.

Thank you for Reading. Are you fascinated to know more about Magento? What are you waiting for? Check out the other blogs in the Magento section and other Magento Plugins. Follow us on YouTube, Github, and Instagram to know more about us. Always happy to hear from you. The Code improvement and Module Enhancement are Appreciated. For any Magento 2 projects or Magento 2 freelancing, contact me at "mohithdeveloper@gmail.com".


Post a Comment

0 Comments