2023-07-01 16:20:54 +08:00

60 lines
1.8 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
// | Author: Niucloud Team
// +----------------------------------------------------------------------
namespace app\dict\schedule;
class ScheduleDict
{
const CRON = 'cron';//定时任务
const CROND = 'crond';//周期任务
const ON = 1;
const OFF = 2;
/**
* 任务模式
* @return array
*/
public static function getType(){
return [
self::CRON => get_lang('dict_schedule.type_cron'),//定时任务
self::CROND => get_lang('dict_schedule.type_crond'),//周期任务
];
}
/**
* 任务启用状态
* @return array
*/
public static function getStatus(){
return [
self::ON => get_lang('dict_schedule.on'),//启用
self::OFF => get_lang('dict_schedule.off'),//关闭
];
}
const MIN = 'min';//每隔几分钟
const HOUR = 'hour';//每隔几小时
const DAY = 'day';//每隔几天
const WEEK = 'week';//每周
const MONTH = 'month';//每月
public static function getDateType(){
return [
self::MIN => get_lang('dict_schedule.min'),
self::HOUR => get_lang('dict_schedule.hour'),
self::DAY => get_lang('dict_schedule.day'),
self::WEEK => get_lang('dict_schedule.week'),
self::MONTH => get_lang('dict_schedule.month'),
];
}
}