famelo/scheduler

此软件包最新版本(dev-master)没有可用的许可证信息。

安装: 368

依赖项: 0

建议者: 0

安全: 0

星星: 4

观察者: 3

分支: 0

开放问题: 0

类型:typo3-flow-package

dev-master 2012-12-11 15:35 UTC

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语法