cdk-rds-scheduler
Version:
Automatic Start and Stop Scheduler for AWS RDS
64 lines (63 loc) • 1.5 kB
TypeScript
/**
* Options to configure a cron expression
*
* All fields are strings so you can use complex expressions. Absence of
* a field implies '*' or '?', whichever one is appropriate.
*
* @see https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-cron-expressions.html
*/
export interface CronOptions {
/**
* The minute to run this rule at
*
* @default - Every minute
*/
readonly minute?: string;
/**
* The hour to run this rule at
*
* @default - Every hour
*/
readonly hour?: string;
/**
* The day of the month to run this rule at
*
* @default - Every day of the month
*/
readonly day?: string;
/**
* The month to run this rule at
*
* @default - Every month
*/
readonly month?: string;
/**
* The year to run this rule at
*
* @default - Every year
*/
readonly year?: string;
/**
* The day of the week to run this rule at
*
* @default - Any day of the week
*/
readonly weekDay?: string;
}
export declare class Cron {
private readonly minute;
private readonly hour;
private readonly day;
private readonly month;
private readonly weekDay;
private readonly year;
/**
* Create a cron expression
*/
constructor(options: CronOptions);
/**
* Return the cron expression
*/
toString(): string;
private validate;
}