Download the PHP package anonymous-php/yii-scheduling without Composer
On this page you can find all versions of the php package anonymous-php/yii-scheduling. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download anonymous-php/yii-scheduling
More information about anonymous-php/yii-scheduling
Files in anonymous-php/yii-scheduling
Package yii-scheduling
Short Description Scheduling extension for Yii 1.1.* framework
License MIT
Informations about the package yii-scheduling
Schedule extension for Yii 1.1
This extension is the port of omnilight/yii2-scheduling (https://github.com/omnilight/yii2-scheduling)
Installation
The preferred way to install this extension is through composer.
Either run
or add
to the require
section of your composer.json.
Description
This project is inspired by the Laravel's Schedule component and tries to bring it's simplicity to the Yii framework. Quote from Laravel's documentation:
After installation you have to create console command extending Anonymous\Scheduling\ScheduleCommand
class
and implement schedule()
method with your jobs inside:
When setup will be finished just put single line into crontab:
You can put your schedule into the schedule.php
file, or add it withing bootstrapping of your extension or
application
Schedule examples
This extension is support all features of Laravel's Schedule, except environments and maintance mode.
Scheduling Closures
Scheduling Terminal Commands
Running command of your application
Frequent Jobs
Daily Jobs
Daily Jobs At A Specific Time (24 Hour Time)
Twice Daily Jobs
Job That Runs Every Weekday
Weekly Jobs
Monthly Jobs
Job That Runs On Specific Days
Only Allow Job To Run When Callback Is True
E-mail The Output Of A Scheduled Job
Preventing Task Overlaps
Used by default FileMutex
or 'mutex' application component (https://github.com/yiisoft/mutex)
Running Tasks On One Server
To utilize this feature, you must config mutex in the application component, except the FileMutex:
Yiisoft\Mutex\MysqlMutex
,Yiisoft\Mutex\PgsqlMutex
,Yiisoft\Mutex\OracleMutex
orYiisoft\Mutex\RedisMutex
. In addition, all servers must be communicating with the same central db/cache server.
Below shows the redis mutex demo:
Using addition functions
If you want to use thenPing
method of the Event, you should add the following string to the composer.json
of your app:
Note about timezones
Please note, that this is PHP extension, so it use timezone defined in php config or in your Yii's configuration file, so set them correctly.
All versions of yii-scheduling with dependencies
yiisoft/yii Version *
yiisoft/mutex Version 3.0.x-dev
yiisoft/mutex-file Version 3.0.x-dev
symfony/process Version 2.6.* || 3.* || 4.*
mtdowling/cron-expression Version ~1.0