Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zuiketang
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
zuiketang
Commits
99eb96c7
Commit
99eb96c7
authored
Nov 05, 2016
by
汪波
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
31807674
e4482af5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
TaskController.php
src/console/controllers/TaskController.php
+6
-5
No files found.
src/console/controllers/TaskController.php
View file @
99eb96c7
...
@@ -17,10 +17,11 @@ class TaskController extends Controller
...
@@ -17,10 +17,11 @@ class TaskController extends Controller
public
function
actionIndex
()
public
function
actionIndex
()
{
{
$jobby
=
new
Jobby
();
$jobby
=
new
Jobby
();
$yiiCommand
=
$_SERVER
[
'SCRIPT_FILENAME'
];
$phpBin
=
'/usr/local/webserver/php537/bin/php -c /usr/local/webserver/php537/etc/crontab.ini '
;
$yiiCommand
=
$phpBin
.
$_SERVER
[
'SCRIPT_FILENAME'
];
$output
=
Yii
::
getAlias
(
'@runtime'
)
.
"/logs/jobs-"
.
date
(
'Y-m-d'
)
.
".log"
;
$output
=
Yii
::
getAlias
(
'@runtime'
)
.
"/logs/jobs-"
.
date
(
'Y-m-d'
)
.
".log"
;
if
(
YII_DEBUG
)
{
if
(
YII_DEBUG
)
{
$time
=
date
(
'Y-m-d H:i:s'
);
$time
=
date
(
'Y-m-d H:i:s'
);
$jobby
->
add
(
'CommandExample'
,
[
$jobby
->
add
(
'CommandExample'
,
[
...
@@ -46,14 +47,14 @@ class TaskController extends Controller
...
@@ -46,14 +47,14 @@ class TaskController extends Controller
'command'
=>
"
$yiiCommand
withdraw/settle"
,
'command'
=>
"
$yiiCommand
withdraw/settle"
,
'schedule'
=>
'30 8 * * 1-5'
,
//每周一到周五上午8:30
'schedule'
=>
'30 8 * * 1-5'
,
//每周一到周五上午8:30
'output'
=>
$output
,
'output'
=>
$output
,
'enabled'
=>
true
'enabled'
=>
TRUE
]);
]);
$jobby
->
add
(
'ClearUploadPool'
,
[
$jobby
->
add
(
'ClearUploadPool'
,
[
'command'
=>
"
$yiiCommand
maintain/clear-upload-pool"
,
'command'
=>
"
$yiiCommand
maintain/clear-upload-pool"
,
'schedule'
=>
'15 */2 * * *'
,
//每隔两小时的第15分钟
'schedule'
=>
'15 */2 * * *'
,
//每隔两小时的第15分钟
'output'
=>
$output
,
'output'
=>
$output
,
'enabled'
=>
true
'enabled'
=>
TRUE
]);
]);
$jobby
->
run
();
$jobby
->
run
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment