提交者
Karson
Merge pull request !9 from trytodie/master
正在显示
1 个修改的文件
包含
3 行增加
和
3 行删除
@@ -62,7 +62,7 @@ class Autotask extends Controller | @@ -62,7 +62,7 @@ class Autotask extends Controller | ||
62 | if ($crontab['maximums'] && $crontab['executes'] > $crontab['maximums']) | 62 | if ($crontab['maximums'] && $crontab['executes'] > $crontab['maximums']) |
63 | { | 63 | { |
64 | //任务已超过最大执行次数 | 64 | //任务已超过最大执行次数 |
65 | - $update['status'] = 'finished'; | 65 | + $update['status'] = 'completed'; |
66 | } | 66 | } |
67 | else if ($crontab['endtime'] > 0 && $time > $crontab['endtime']) | 67 | else if ($crontab['endtime'] > 0 && $time > $crontab['endtime']) |
68 | { | 68 | { |
@@ -83,7 +83,7 @@ class Autotask extends Controller | @@ -83,7 +83,7 @@ class Autotask extends Controller | ||
83 | { | 83 | { |
84 | $update['executetime'] = $time; | 84 | $update['executetime'] = $time; |
85 | $update['executes'] = $crontab['executes'] + 1; | 85 | $update['executes'] = $crontab['executes'] + 1; |
86 | - $update['status'] = ($crontab['maximums'] > 0 && $update['executes'] >= $crontab['maximums']) ? 'finished' : 'normal'; | 86 | + $update['status'] = ($crontab['maximums'] > 0 && $update['executes'] >= $crontab['maximums']) ? 'completed' : 'normal'; |
87 | } | 87 | } |
88 | 88 | ||
89 | // 如果需要更新状态 | 89 | // 如果需要更新状态 |
@@ -118,7 +118,7 @@ class Autotask extends Controller | @@ -118,7 +118,7 @@ class Autotask extends Controller | ||
118 | else if ($crontab['type'] == 'shell') | 118 | else if ($crontab['type'] == 'shell') |
119 | { | 119 | { |
120 | // 执行Shell | 120 | // 执行Shell |
121 | - exec('nohup php ' . $crontab['content'] . ' >> ' . $logDir . date("Y-m-d") . '.log 2>&1 &'); | 121 | + exec( $crontab['content'] . ' >> ' . $logDir . date("Y-m-d") . '.log 2>&1 &'); |
122 | } | 122 | } |
123 | } | 123 | } |
124 | catch (Exception $e) | 124 | catch (Exception $e) |
-
请 注册 或 登录 后发表评论