zero1 / magento2-run-cron-job
Installs: 2 623
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 3
Forks: 1
Open Issues: 0
Requires
- magento/framework: ^103.0
Suggests
- mdoq/module-connector: Improves DevOps for Magento2
README
Small CLI addition to allow running of cronjobs by job_code. This could be for debuging purposes or to add to your crontab.
Example
To test generation of sitemaps
php bin/magento cron:run-job --job-code=sitemap_generate
The job-code
is that same as would be found in the cron_schedule
table
Or in a modules crontab.xml
for example:
https://github.com/magento/magento2/blob/2.4-develop/app/code/Magento/Sitemap/etc/crontab.xml#L10
Versions
- For Magento >= 2.4, use 1.1.0
- For Magento < 2.4, use 1.0.1