Skip to content


Folders and files

Last commit message
Last commit date

Latest commit



11 Commits

Repository files navigation

Clean blocked running cron

License: MIT

This module add a CLI command which allows you to end a CRON job that is running for a defined time. The free source is available at the GitHub repository.


  • PHP >= 7.1
  • Magento >= 2.2


Get the package

Zip Package:

Unzip the package in app/code/Blackbird/CleanBlockedRunningCron, from the root of your Magento instance.

Composer Package:

composer require blackbird/clean-blocked-running-cron

Install the module

Go to your Magento root, then run the following Magento command:

php bin/magento setup:upgrade

If you are in production mode, do not forget to recompile and redeploy the static resources, or to use the --keep-generated option.


This extension gives you a new CLI command for your Magento :

php <magento-root-dir>/bin/magento cron:blocked:clean -H <hours> -M <minutes> -c <job code(s)>


  • -H or --hours and -M or --minutes allows you to define how long after execution the jobs are considered blocked.
  • -c or --cron allows you to define which cron jobs need to be killed after H hours and M minutes execution. It's possible to define multiple jobs separated by a comma.

The idea is to use this command in your crontab for each job which sometime blocked.
Be carefully to define the appropriate hours and minutes for the defined cron job codes to not kill real running jobs.



For further information, contact us:



This project is licensed under the MIT License - see the LICENSE file for details.

That's all folks!