feat: add 'minutely' option to recurrence types in CreateTaskDialog and schedulers
This commit is contained in:
@@ -39,7 +39,7 @@ interface CreateTaskDialogProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const TASK_TYPES: TaskType[] = ['credit_recharge', 'play_sound', 'play_playlist']
|
const TASK_TYPES: TaskType[] = ['credit_recharge', 'play_sound', 'play_playlist']
|
||||||
const RECURRENCE_TYPES: RecurrenceType[] = ['none', 'hourly', 'daily', 'weekly', 'monthly', 'yearly', 'cron']
|
const RECURRENCE_TYPES: RecurrenceType[] = ['none', 'minutely', 'hourly', 'daily', 'weekly', 'monthly', 'yearly', 'cron']
|
||||||
|
|
||||||
export function CreateTaskDialog({
|
export function CreateTaskDialog({
|
||||||
open,
|
open,
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ export type TaskType = 'credit_recharge' | 'play_sound' | 'play_playlist'
|
|||||||
|
|
||||||
export type TaskStatus = 'pending' | 'running' | 'completed' | 'failed' | 'cancelled'
|
export type TaskStatus = 'pending' | 'running' | 'completed' | 'failed' | 'cancelled'
|
||||||
|
|
||||||
export type RecurrenceType = 'none' | 'hourly' | 'daily' | 'weekly' | 'monthly' | 'yearly' | 'cron'
|
export type RecurrenceType = 'none' | 'minutely' | 'hourly' | 'daily' | 'weekly' | 'monthly' | 'yearly' | 'cron'
|
||||||
|
|
||||||
// Task interfaces
|
// Task interfaces
|
||||||
export interface ScheduledTask {
|
export interface ScheduledTask {
|
||||||
@@ -166,6 +166,8 @@ export function getRecurrenceTypeLabel(recurrenceType: RecurrenceType): string {
|
|||||||
switch (recurrenceType) {
|
switch (recurrenceType) {
|
||||||
case 'none':
|
case 'none':
|
||||||
return 'None'
|
return 'None'
|
||||||
|
case 'minutely':
|
||||||
|
return 'Minutely'
|
||||||
case 'hourly':
|
case 'hourly':
|
||||||
return 'Hourly'
|
return 'Hourly'
|
||||||
case 'daily':
|
case 'daily':
|
||||||
|
|||||||
Reference in New Issue
Block a user