natural-cron
Version:
Natural Cron is a easy-to-use Node.js library for creating and validating cron expressions with natural, human-readable APIs.
18 lines (17 loc) • 509 B
TypeScript
export type ScheduleUnit = 'minute' | 'hour' | 'dayOfMonth' | 'month' | 'dayOfWeek';
export type ScheduleValue = string | number;
export interface Schedule {
[key: string]: ScheduleValue | undefined;
minute?: ScheduleValue;
hour?: ScheduleValue;
dayOfMonth?: ScheduleValue;
month?: ScheduleValue;
dayOfWeek?: ScheduleValue;
}
export declare enum CronTimeUnit {
Minute = "minute",
Hour = "hour",
DayOfMonth = "dayOfMonth",
Month = "month",
DayOfWeek = "dayOfWeek"
}