You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
excel_handle/app/model/CrontabT.php

24 lines
445 B

4 years ago
<?php
namespace app\model;
use crontab\CronParser;
use think\Model;
/**
* Class CrontabT
* @property string $crontab_str
* @package crontab
*/
class CrontabT extends Model
{
public function getNextRunDate()
{
if (!CronParser::check($this->crontab_str)) {
return ['code' => 0, 'msg' => "格式错误: {$this->crontab_str}"];
}
return CronParser::formatToDate($this->crontab_str, 1)[0];
}
}