- Run
composer require omnilight/yii2-schedulingto install the scheduling package - Setup a
config/schedule.phpfile to house your scheduled processes - Modify your
config/app.phpto include theschedulecomponent details to run the Craft command (instead ofyii) - Run
php craft schedule/run --scheduleFile=@config/schedule.phpto process any scheduled operations.
π‘ Tip: You likely want to run php craft schedule/run --scheduleFile=@config/schedule.php on a cron job that fires every minute!
- The fantastic omnilight/yii2-scheduling package
- Brandon Kelly's mention of how omnilight/yii2-scheduling is used in the craftnet repo