Set to run in a specific minute
atMinute(2); // 2 * * * *
Provide two time points of the same type to create a range
between(atMinute(2), atMinute(20)); // 2-20 * * * *
Combine different time points
combine(atMinute(30), between(atHour(2), atHour(4))); // 30 2-4 * * *
Every X time point
every(3).minutes(); // *\/3 * * *
every(3).hours(); // 0 *\/3 * * *
every(3).months(); // 0 0 1 *\/3 *
Every single hour or every X hours after current date time. Defaults to the first minute of that hour.
everyHour(3); // 0 *\/3 * * *
Every single minute or every X minute after current date time
everyMinute(3); // *\/3 * * * *
Every single month or every X months after current date time. Defaults to the first minute, first hour and first day of the month.
everyHour(3); // 0 *\/3 * * *
In specific month or multiple specific months
inMonth(3); // * * * 3 *
inMonth([3,5]); // * * * 3,5 *
inMonth('January'); // * * * 1 *
inMonth(['January', 'December']); // * * * 1,12 *
In specific day of the month
onDayOfTheMonth(3); // * * 3 * *
onDayOfTheMonth([3,5]); // * * 3,5 * *
In specific day of the week
onDayOfTheWeek(3); // 0 0 * * 3
onDayOfTheWeek([3,5]); // 0 0 * * 3,5
onDayOfTheWeek('Monday'); // 0 0 * * 1
onDayOfTheWeek(['Sunday', 'Thursday']); // 0 0 * * 0,4
Generated using TypeDoc
Set to run in a specific hour. Defaults to the first minute of that hour
atHour(3); // 0 3 * * *