Download the PHP package kfosoft/yii2-queue-scheduler without Composer
On this page you can find all versions of the php package kfosoft/yii2-queue-scheduler. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kfosoft/yii2-queue-scheduler
More information about kfosoft/yii2-queue-scheduler
Files in kfosoft/yii2-queue-scheduler
Package yii2-queue-scheduler
Short Description Extension provides functionality for make scheduled job for yii2-queue lib
License MIT
Informations about the package yii2-queue-scheduler
Yii2 Queue Scheduler
Yii2 extension for yiisoft/yii2-queue
library
Install
composer require kfosoft/yii2-queue-scheduler
Configure
For both(web, console) configs
For console config
And migrate the migration from repository
To run daemon
NOTE: To make it work properly you have to choose one of the options:
supervisor
look at the supervisor config in repositorycron
with WatcherDaemon(NOT TESTED).
Then add this line to crontab
Using
-
In order to use scheduler you have to create job and implement
ScheduledJobInterface
. Also you have to implementgetJobParams
method in job class. It has to return the array fields values for creating a job. For example: - You can schedule a job for example in 5 minutes or at 7AM next day.
NOTE: All jobs run in UTC timezone. Please set timestamp for enqueueAt
method(The second param) in server's timezone because the component converts the timezone to UTC automatically.
-
You can check scheduled jobs if needed.
-
Also you can remove the scheduled jobs if needed.
- Also you can get the scheduled jobs for current moment.
All versions of yii2-queue-scheduler with dependencies
yiisoft/yii2 Version >=2.0.34
ext-json Version *
kfosoft/yii2-daemon Version 20.09
ramsey/uuid Version ^4.0