| 123456789101112131415161718192021222324252627282930 |
- #!/alidata/server/php/bin/php
- <?php
- require './common/base.php';
- //初始化配置参数
- //php命令
- $phpPath = \lwmf\base\Config::getInstance()->get('php', 'worker');
- //项目目录
- $projectPath = LWM_PROJECT_PATH;
- //进程运行角色
- $uid = \lwmf\base\Config::getInstance()->get('uid', 'worker');
- //乐外卖定制任务配置
- //# Example of job definition:
- //# .---------------- minute (0 - 59)
- //# | .------------- hour (0 - 23)
- //# | | .---------- day of month (1 - 31)
- //# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
- //# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
- //# | | | | |
- //# * * * * * user-name command to be executed
- $crontab =<<< EOT
- #每分钟上报监控数据
- */1 * * * * {$uid} {$phpPath} {$projectPath}/scripts/yiic statis push &>> {$projectPath}/runtime/statis_push.log
- EOT;
- //安装定时任务
- installCrontab();
|