- Run
composer require omnilight/yii2-scheduling
to install the scheduling package - Setup a
config/schedule.php
file to house your scheduled processes - Modify your
config/app.php
to include theschedule
component details to run the Craft command (instead ofyii
) - Run
php craft schedule/run --scheduleFile=@config/schedule.php
to 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!