1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-06-26 20:52:44 +08:00
course-tencent-cloud/scheduler.php
koogua edf1074bec !43 v1.2.0阶段性合并
* Merge branches 'develop' and 'master' of https://gitee.com/koogua/cour…
* 优化开发登录,计划任务执行路径,周期
* !41 修复课程分类未过滤2
* !40 修复课程分类未过滤2
* !39 修复课程分类未过滤
* !38 修复课程分类未过滤
* Merge branch 'master' of https://gitee.com/koogua/course-tencent-cloud…
* !36 修复添加课程后进入列表500错误
* !35 修复腾讯云回调数据结构改变导致的错误
* !34 修复创建课时相关属性表数据未生成的问题 
* !23 修复添加课时后进入编辑页面500错误
2020-12-09 18:04:25 +08:00

58 lines
1.7 KiB
PHP

<?php
require_once __DIR__ . '/vendor/autoload.php';
use GO\Scheduler;
$scheduler = new Scheduler();
$script = __DIR__ . '/console.php';
$bin = '/usr/local/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('*/5 * * * *');
$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();