<?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);