Files
23cm/config/schedule.php
2026-01-25 18:18:09 +08:00

18 lines
910 B
PHP

<?php
/**
* @var \omnilight\scheduling\Schedule $schedule
*/
// /Users/toom/Documents/yii2/xiansuo_admin
// php /www/wwwroot/sites/clue/index/clue/yii schedule/run --scheduleFile=/Users/toom/Documents/yii2/xiansuo_admin/config/schedule.php 1>> /dev/null 2>&1
$path = Yii::getAlias('@runtime') . '/logs/' . date('Ym') . '/' . date('d') . '/';
$h = date('H');
$hi = date('H-i');
\app\common\FileHelper::mkdirs($path);
// php /www/wwwroot/sites/clue/index/clue/yii schedule/run --scheduleFile=/www/wwwroot/sites/clue/index/clue/config/schedule.php 1>> /dev/null 2>&1
/** 8-22/每2小时执行一次 / 获取【小红书定制】文章信息 */
$filePath = $path . 'clue_chain.log';
$schedule->command('sync/pull-clue-chain')->cron('*/5 * * * * *')->appendOutputTo($filePath);
$filePath = $path . 'refresh_token.log';
$schedule->command('sync/refresh-token')->cron('0 */12 * * * *')->appendOutputTo($filePath);