mirror of
https://github.com/xuthus83/pigallery2.git
synced 2024-11-03 21:04:03 +08:00
1ddc73d461
updating settings version bump
30 lines
677 B
TypeScript
30 lines
677 B
TypeScript
export enum TaskTriggerType {
|
|
never = 1, scheduled = 2, periodic = 3
|
|
}
|
|
|
|
export interface TaskTrigger {
|
|
type: TaskTriggerType;
|
|
}
|
|
|
|
export interface NeverTaskTrigger {
|
|
type: TaskTriggerType.never;
|
|
}
|
|
|
|
export interface ScheduledTaskTrigger extends TaskTrigger {
|
|
type: TaskTriggerType.scheduled;
|
|
time: number; // data time
|
|
}
|
|
|
|
export interface PeriodicTaskTrigger extends TaskTrigger {
|
|
type: TaskTriggerType.periodic;
|
|
periodicity: number; // 0-6: week days 7 every day
|
|
atTime: number; // day time
|
|
}
|
|
|
|
export interface TaskScheduleDTO {
|
|
priority: number;
|
|
taskName: string;
|
|
config: any;
|
|
trigger: NeverTaskTrigger | ScheduledTaskTrigger | PeriodicTaskTrigger;
|
|
}
|