use super::*;
pub(crate) const ALIAS_YEARLY: &str = "@yearly";
pub(crate) const ALIAS_ANNUALLY: &str = "@annually";
pub(crate) const ALIAS_MONTHLY: &str = "@monthly";
pub(crate) const ALIAS_WEEKLY: &str = "@weekly";
pub(crate) const ALIAS_DAILY: &str = "@daily";
pub(crate) const ALIAS_MIDNIGHT: &str = "@midnight";
pub(crate) const ALIAS_HOURLY: &str = "@hourly";
pub(crate) const MAX_SEARCH_YEARS: i32 = 100;
pub(crate) const ALL_HOURS_MASK: u64 = (1u64 << 24) - 1;
pub(crate) const ALL_DAYS_MASK: u64 = ((1u64 << 31) - 1) << 1;
pub(crate) const ALL_MONTHS_MASK: u64 = ((1u64 << 12) - 1) << 1;
pub(crate) const ALL_WEEKDAYS_MASK: u64 = (1u64 << 7) - 1;
pub(crate) const SCHEDULE_YEARLY: CronSchedule = CronSchedule {
seconds: 1,
minutes: 1,
hours: 1,
days: 1u64 << 1,
months: 1u64 << 1,
weekdays: ALL_WEEKDAYS_MASK,
day_restricted: true,
weekday_restricted: false,
};
pub(crate) const SCHEDULE_MONTHLY: CronSchedule = CronSchedule {
seconds: 1,
minutes: 1,
hours: 1,
days: 1u64 << 1,
months: ALL_MONTHS_MASK,
weekdays: ALL_WEEKDAYS_MASK,
day_restricted: true,
weekday_restricted: false,
};
pub(crate) const SCHEDULE_WEEKLY: CronSchedule = CronSchedule {
seconds: 1,
minutes: 1,
hours: 1,
days: ALL_DAYS_MASK,
months: ALL_MONTHS_MASK,
weekdays: 1,
day_restricted: false,
weekday_restricted: true,
};
pub(crate) const SCHEDULE_DAILY: CronSchedule = CronSchedule {
seconds: 1,
minutes: 1,
hours: 1,
days: ALL_DAYS_MASK,
months: ALL_MONTHS_MASK,
weekdays: ALL_WEEKDAYS_MASK,
day_restricted: false,
weekday_restricted: false,
};
pub(crate) const SCHEDULE_HOURLY: CronSchedule = CronSchedule {
seconds: 1,
minutes: 1,
hours: ALL_HOURS_MASK,
days: ALL_DAYS_MASK,
months: ALL_MONTHS_MASK,
weekdays: ALL_WEEKDAYS_MASK,
day_restricted: false,
weekday_restricted: false,
};