mirror of https://gitee.com/karson/fastadmin.git
修复定时任务不能修改时间的BUG
parent
81ddcd143c
commit
4217f56b1e
|
|
@ -1,10 +1,13 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'Title' => '任务标题',
|
'Title' => '任务标题',
|
||||||
'Maximums' => '最多执行',
|
'Maximums' => '最多执行',
|
||||||
'Sleep' => '延迟秒数',
|
'Sleep' => '延迟秒数',
|
||||||
'Schedule' => '执行周期',
|
'Schedule' => '执行周期',
|
||||||
'Executes' => '执行次数',
|
'Executes' => '执行次数',
|
||||||
'Execute time' => '执行时间',
|
'Execute time' => '执行时间',
|
||||||
|
'Request Url' => '请求URL',
|
||||||
|
'Execute Sql Script' => '执行SQL',
|
||||||
|
'Execute Shell' => '执行Shell',
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -15,5 +15,23 @@ class Crontab extends Model
|
||||||
// 定义字段类型
|
// 定义字段类型
|
||||||
protected $type = [
|
protected $type = [
|
||||||
];
|
];
|
||||||
|
// 追加属性
|
||||||
|
protected $append = [
|
||||||
|
];
|
||||||
|
|
||||||
|
protected function setBegintimeAttr($value)
|
||||||
|
{
|
||||||
|
return $value && !is_numeric($value) ? strtotime($value) : $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function setEndtimeAttr($value)
|
||||||
|
{
|
||||||
|
return $value && !is_numeric($value) ? strtotime($value) : $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function setExecutetimeAttr($value)
|
||||||
|
{
|
||||||
|
return $value && !is_numeric($value) ? strtotime($value) : $value;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue