|
|
|
@ -1,26 +1,38 @@
|
|
|
|
|
package com.xxl.job.admin.core.scheduler;
|
|
|
|
|
|
|
|
|
|
import com.xxl.job.admin.core.util.I18nUtil;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @author xuxueli 2020-10-29 21:11:23
|
|
|
|
|
*/
|
|
|
|
|
public enum ScheduleTypeEnum {
|
|
|
|
|
|
|
|
|
|
NONE,
|
|
|
|
|
NONE(I18nUtil.getString("schedule_type_none")),
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* schedule by cron
|
|
|
|
|
*/
|
|
|
|
|
CRON,
|
|
|
|
|
CRON(I18nUtil.getString("schedule_type_cron")),
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* schedule by fixed rate (in seconds)
|
|
|
|
|
*/
|
|
|
|
|
FIX_RATE,
|
|
|
|
|
FIX_RATE(I18nUtil.getString("schedule_type_fix_rate")),
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* schedule by fix delay (in seconds), after the last time
|
|
|
|
|
*/
|
|
|
|
|
FIX_DELAY;
|
|
|
|
|
FIX_DELAY(I18nUtil.getString("schedule_type_fix_delay"));
|
|
|
|
|
|
|
|
|
|
private String title;
|
|
|
|
|
|
|
|
|
|
ScheduleTypeEnum(String title) {
|
|
|
|
|
this.title = title;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getTitle() {
|
|
|
|
|
return title;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static ScheduleTypeEnum match(String name){
|
|
|
|
|
for (ScheduleTypeEnum item: ScheduleTypeEnum.values()) {
|
|
|
|
|