Skip to main content

sys:cron:schedule

Schedule a cronjob for execution right now.

Usage​

n98-magerun2.phar sys:cron:schedule <job_code>
  • <job_code>: The code of the cronjob to schedule for immediate execution.

Description​

This command schedules a Magento cronjob (defined in crontab.xml) to be executed as soon as possible. It is useful for testing or triggering specific jobs without waiting for the next scheduled run.

Example​

Schedule the indexer_reindex_all_invalid cronjob:

n98-magerun2.phar sys:cron:schedule indexer_reindex_all_invalid

Options​

  • --help Show help for the command