diff --git a/module/common/view/footer.lite.html.php b/module/common/view/footer.lite.html.php index 456b04cc74..413b70d9f9 100755 --- a/module/common/view/footer.lite.html.php +++ b/module/common/view/footer.lite.html.php @@ -1,5 +1,6 @@ getExtViewFile(__FILE__)){include $extView; return helper::cd();}?> +loadModel('cron')->runable()) js::execute('startCron()');?> diff --git a/module/cron/control.php b/module/cron/control.php index f165a3e09c..b31b779efe 100644 --- a/module/cron/control.php +++ b/module/cron/control.php @@ -40,6 +40,17 @@ class cron extends control die(js::reload('parent')); } + /** + * Open cron process. + * + * @access public + * @return void + */ + public function openProcess() + { + $this->display(); + } + /** * Create cron. * diff --git a/module/cron/lang/en.php b/module/cron/lang/en.php index 5cc35ccea1..0404479879 100644 --- a/module/cron/lang/en.php +++ b/module/cron/lang/en.php @@ -1,12 +1,13 @@ cron->common = 'Cron'; -$lang->cron->index = 'Index'; -$lang->cron->list = 'List'; -$lang->cron->create = 'Create'; -$lang->cron->edit = 'Edit'; -$lang->cron->delete = 'Delete'; -$lang->cron->toggle = 'Activation/Disable'; -$lang->cron->turnon = 'Open/Close'; +$lang->cron->common = 'Cron'; +$lang->cron->index = 'Index'; +$lang->cron->list = 'List'; +$lang->cron->create = 'Create'; +$lang->cron->edit = 'Edit'; +$lang->cron->delete = 'Delete'; +$lang->cron->toggle = 'Activation/Disable'; +$lang->cron->turnon = 'Open/Close'; +$lang->cron->openProcess = 'Open process'; $lang->cron->m = 'Minute'; $lang->cron->h = 'Hour'; @@ -43,8 +44,9 @@ $lang->cron->confirmOpen = <<cron->notice = new stdclass(); -$lang->cron->notice->m = 'Range : 0-59,"*" express the range of numbers, "/" express "Every", "-" express digital range.'; -$lang->cron->notice->h = 'Range : 0-23'; -$lang->cron->notice->dom = 'Range : 1-31'; -$lang->cron->notice->mon = 'Range : 1-12'; -$lang->cron->notice->dow = 'Range : 0-6'; +$lang->cron->notice->m = 'Range : 0-59,"*" express the range of numbers, "/" express "Every", "-" express digital range.'; +$lang->cron->notice->h = 'Range : 0-23'; +$lang->cron->notice->dom = 'Range : 1-31'; +$lang->cron->notice->mon = 'Range : 1-12'; +$lang->cron->notice->dow = 'Range : 0-6'; +$lang->cron->notice->help = 'Note: if the server is restarted, or that the timing task is not normal, then the timing task has stopped. You need to click the [Open process] button or refresh page after a minute to open the scheduled tasks. If the last run time of first record is changed in cron list, then the task is turned on.'; diff --git a/module/cron/lang/zh-cn.php b/module/cron/lang/zh-cn.php index d8e1a4b248..fcf17a1030 100644 --- a/module/cron/lang/zh-cn.php +++ b/module/cron/lang/zh-cn.php @@ -1,12 +1,13 @@ cron->common = '定时任务'; -$lang->cron->index = '首页'; -$lang->cron->list = '任务列表'; -$lang->cron->create = '添加'; -$lang->cron->edit = '编辑'; -$lang->cron->delete = '删除'; -$lang->cron->toggle = '激活/禁用'; -$lang->cron->turnon = '打开/关闭'; +$lang->cron->common = '定时任务'; +$lang->cron->index = '首页'; +$lang->cron->list = '任务列表'; +$lang->cron->create = '添加'; +$lang->cron->edit = '编辑'; +$lang->cron->delete = '删除'; +$lang->cron->toggle = '激活/禁用'; +$lang->cron->turnon = '打开/关闭'; +$lang->cron->openProcess = '创建进程'; $lang->cron->m = '分'; $lang->cron->h = '小时'; @@ -43,8 +44,9 @@ $lang->cron->confirmOpen = <<cron->notice = new stdclass(); -$lang->cron->notice->m = '取值范围:0-59,"*"代表取值范围内的数字,"/"代表"每", "-"代表数字范围。'; -$lang->cron->notice->h = '取值范围:0-23'; -$lang->cron->notice->dom = '取值范围:1-31'; -$lang->cron->notice->mon = '取值范围:1-12'; -$lang->cron->notice->dow = '取值范围:0-6'; +$lang->cron->notice->m = '取值范围:0-59,"*"代表取值范围内的数字,"/"代表"每", "-"代表数字范围。'; +$lang->cron->notice->h = '取值范围:0-23'; +$lang->cron->notice->dom = '取值范围:1-31'; +$lang->cron->notice->mon = '取值范围:1-12'; +$lang->cron->notice->dow = '取值范围:0-6'; +$lang->cron->notice->help = '注:如果服务器重启,或者发现定时任务没有正常工作,那么定时任务已经停止工作。需要手动点击【创建进程】按钮,或者一分钟后刷新页面,来开启计划任务。如果任务列表中第一条记录的最后执行时间改变,说明任务开启成功。'; diff --git a/module/cron/view/index.html.php b/module/cron/view/index.html.php index 13360d947a..7931efc7e6 100644 --- a/module/cron/view/index.html.php +++ b/module/cron/view/index.html.php @@ -20,7 +20,10 @@ cron->list?> - cron->create, '', "class='btn btn-primary btn-sm'")?> + + cron->openProcess, 'hiddenwin', "class='btn btn-sm'")?> + cron->create, '', "class='btn btn-primary btn-sm'")?> + @@ -61,6 +64,7 @@ +cron->notice->help?> diff --git a/module/cron/view/openprocess.html.php b/module/cron/view/openprocess.html.php new file mode 100644 index 0000000000..a51f9b2193 --- /dev/null +++ b/module/cron/view/openprocess.html.php @@ -0,0 +1,22 @@ + + * @package cron + * @version $Id$ + * @link http://www.zentao.net + */ +?> + + +