- If a Job implements
ShouldQueue
the Job will be automatically added to the queue (as do both Shopify Statamic and Statamic Peak|Peak Social Image Generation (class ImportAllProductsJob implements ShouldQueue
)
- Jobs are added to the schedule within
app/Console/Kernel.php
→ schedule()
, e.g.
protected function schedule(Schedule $schedule) {
$schedule->command('shopify:import:all')->everyFiveMinutes();
}
- The
.env
in Forge must be configured to use redis instead of sync as both QUEUE_CONNECTION
and QUEUE_DRIVER
:
QUEUE_CONNECTION=redis
QUEUE_DRIVER=redis
- A cronjob needs to call the artisan scheduler using
scheduler:run
, e.g. php /home/forge/stage.mysite.klick.re/artisan schedule:run