famelo / scheduler
此软件包最新版本(dev-master)没有可用的许可证信息。
dev-master
2012-12-11 15:35 UTC
Requires
This package is auto-updated.
Last update: 2024-09-05 18:18:15 UTC
README
为调度器设置cron作业
* * * * * /path/to/flow scheduler:run
创建新任务
class MyTask implements \Famelo\Scheduler\Tasks\TaskInterface { /** * Returns the Interval at which this task will be run * The Syntax is equivalent to cron. * Check the mtdowling/cron-expression package for more information: * https://github.com/mtdowling/cron-expression * * @return string $interval */ public function getInterval() { return '*/15 * * * *'; } /** * Execute the Task * * @return void */ public function execute() { // Let's do something... } } ?>
间隔基于 mtdowling/cron-expression,该表达式基于cron语法