A powerful Magento 2 module that provides console commands for cron job management. List all cron jobs and run them directly from the command line with optional parameters.
- List all cron jobs with detailed information including group, schedule, instance, and method
- Run specific cron jobs by name with optional parameters
- Filter cron jobs by group or class name
- Parameter inspection - see what parameters each cron job accepts
- Custom parameter passing - pass custom parameters to cron jobs
composer require genaker/magento2-cron-console
php bin/magento module:enable Genaker_CronConsole
php bin/magento setup:upgrade- Download the module files
- Create directory
app/code/Genaker/CronConsole - Copy all files to the directory
- Run the following commands:
php bin/magento module:enable Genaker_CronConsole
php bin/magento setup:upgradephp bin/magento genaker:cron:listFilter by group name or class:
php bin/magento genaker:cron:list catalog
php bin/magento genaker:cron:list Indexerphp bin/magento genaker:cron:run <jobName>Example:
php bin/magento genaker:cron:run catalog_product_alertPass custom parameters to cron jobs:
php bin/magento genaker:cron:run <jobName> --param=key1=value1 --param=key2=value2Example:
php bin/magento genaker:cron:run my_custom_job --param=limit=100 --param=debug=trueLists all available cron jobs with the following information:
- Group name
- Job name
- Schedule expression
- Instance class
- Method name
- Execute method parameters
- Command to run the job
Options:
filter(optional) - Filter by group name or class name
Runs a specific cron job by name.
Arguments:
jobName(required) - The name of the cron job to run
Options:
--param(optional, multiple) - Additional parameters in key=value format
- PHP 7.4 or higher
- Magento 2.4.x or higher
This module is licensed under the Open Software License (OSL 3.0) and Academic Free License (AFL 3.0).
- Issues: GitHub Issues
- Email: egorshytikov@gmail.com
Contributions are welcome! Please feel free to submit a Pull Request.