Skip to content

Genaker/CronCli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Magento 2 Cron Console

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.

Features

  • 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

Installation

Via Composer (Recommended)

composer require genaker/magento2-cron-console
php bin/magento module:enable Genaker_CronConsole
php bin/magento setup:upgrade

Manual Installation

  1. Download the module files
  2. Create directory app/code/Genaker/CronConsole
  3. Copy all files to the directory
  4. Run the following commands:
php bin/magento module:enable Genaker_CronConsole
php bin/magento setup:upgrade

Usage

List All Cron Jobs

php bin/magento genaker:cron:list

Filter Cron Jobs

Filter by group name or class:

php bin/magento genaker:cron:list catalog
php bin/magento genaker:cron:list Indexer

Run a Specific Cron Job

php bin/magento genaker:cron:run <jobName>

Example:

php bin/magento genaker:cron:run catalog_product_alert

Run Cron Job with Parameters

Pass custom parameters to cron jobs:

php bin/magento genaker:cron:run <jobName> --param=key1=value1 --param=key2=value2

Example:

php bin/magento genaker:cron:run my_custom_job --param=limit=100 --param=debug=true

Commands

genaker:cron:list [filter]

Lists 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

genaker:cron:run <jobName> [--param=key=value]

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

Requirements

  • PHP 7.4 or higher
  • Magento 2.4.x or higher

License

This module is licensed under the Open Software License (OSL 3.0) and Academic Free License (AFL 3.0).

Support

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

About

Run Cron Jobs as a Cli command with additional extra parameters(date etc.) for debug.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages