1 Star 0 Fork 663

jso0/course-tencent-cloud

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
scheduler.php 1.70 KB
一键复制 编辑 原始数据 按行查看 历史
koogua 提交于 2020-09-18 16:47 . 优化代码
<?php
require_once __DIR__ . '/vendor/autoload.php';
use GO\Scheduler;
$scheduler = new Scheduler();
$script = __DIR__ . '/console.php';
$bin = '/usr/bin/php';
$scheduler->php($script, $bin, ['--task' => 'deliver', '--action' => 'main'])
->at('*/3 * * * *');
$scheduler->php($script, $bin, ['--task' => 'live_notify', '--action' => 'main'])
->at('*/5 * * * *');
$scheduler->php($script, $bin, ['--task' => 'sync_learning', '--action' => 'main'])
->at('*/7 * * * *');
$scheduler->php($script, $bin, ['--task' => 'vod_event', '--action' => 'main'])
->at('*/9 * * * *');
$scheduler->php($script, $bin, ['--task' => 'close_trade', '--action' => 'main'])
->at('*/13 * * * *');
$scheduler->php($script, $bin, ['--task' => 'close_order', '--action' => 'main'])
->hourly(3);
$scheduler->php($script, $bin, ['--task' => 'refund', '--action' => 'main'])
->hourly(7);
$scheduler->php($script, $bin, ['--task' => 'sync_course_index', '--action' => 'main'])
->hourly(11);
$scheduler->php($script, $bin, ['--task' => 'sync_group_index', '--action' => 'main'])
->hourly(17);
$scheduler->php($script, $bin, ['--task' => 'sync_user_index', '--action' => 'main'])
->hourly(23);
$scheduler->php($script, $bin, ['--task' => 'clean_log', '--action' => 'main'])
->daily(3, 3);
$scheduler->php($script, $bin, ['--task' => 'unlock_user', '--action' => 'main'])
->daily(3, 7);
$scheduler->php($script, $bin, ['--task' => 'revoke_vip', '--action' => 'main'])
->daily(3, 11);
$scheduler->php($script, $bin, ['--task' => 'clean_token', '--action' => 'main'])
->daily(3, 17);
$scheduler->php($script, $bin, ['--task' => 'sitemap', '--action' => 'main'])
->daily(4, 3);
$scheduler->run();
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/ijimmy/course-tencent-cloud.git
[email protected]:ijimmy/course-tencent-cloud.git
ijimmy
course-tencent-cloud
course-tencent-cloud
master

搜索帮助