Commit 6a527b67 authored by xiabin's avatar xiabin

修改videojs映入方式

parent 36969408
......@@ -18,7 +18,8 @@
"qiniu/php-sdk": "^7.0",
"light/yii2-xmlparser": "*",
"2amigos/yii2-qrcode-helper": "*",
"mobiledetect/mobiledetectlib": "^2.8"
"mobiledetect/mobiledetectlib": "^2.8",
"hellogerard/jobby": "^3.2"
},
"require-dev": {
"yiisoft/yii2-codeception": "*",
......
This diff is collapsed.
<?php
/**
* Created by PhpStorm.
* User: xiabin
* Date: 2016/11/4
* Time: 下午1:45
*/
namespace console\controllers;
use Jobby\Jobby;
use yii\console\Controller;
class TaskController extends Controller
{
public function actionIndex()
{
$jobby = new Jobby();
if(YII_DEBUG){
$time = date('Y-m-d H:i:s');
$output = \Yii::getAlias('@runtime') . "/logs/jobs-" . date('Y-m-d') . ".log";
$jobby->add('CommandExample', [
// Run a shell commands
'command' => "echo $time",
// Ordinary crontab schedule format is supported.
// This schedule runs every hour.
// You could also insert DateTime string in the format of Y-m-d H:i:s.
'schedule' => '*/5 * * * *',
// Stdout and stderr is sent to the specified file
'output' => $output,
// You can turn off a job by setting 'enabled' to false
'enabled' => TRUE,
]);
}
$jobby->run();
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment