Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data CronSchedule = CronSchedule {}
- newtype Crontab = Crontab {}
- data CrontabEntry
- data MinuteSpec
- newtype CronCommand = CronCommand {
- cronCommand :: Text
- minuteSpec :: MinuteSpec -> CronField
- mkMinuteSpec :: CronField -> Maybe MinuteSpec
- data HourSpec
- hourSpec :: HourSpec -> CronField
- mkHourSpec :: CronField -> Maybe HourSpec
- data MonthSpec
- monthSpec :: MonthSpec -> CronField
- mkMonthSpec :: CronField -> Maybe MonthSpec
- data DayOfMonthSpec
- dayOfMonthSpec :: DayOfMonthSpec -> CronField
- mkDayOfMonthSpec :: CronField -> Maybe DayOfMonthSpec
- data DayOfWeekSpec
- dayOfWeekSpec :: DayOfWeekSpec -> CronField
- mkDayOfWeekSpec :: CronField -> Maybe DayOfWeekSpec
- data BaseField
- data SpecificField
- specificField :: SpecificField -> Int
- mkSpecificField :: Int -> Maybe SpecificField
- data RangeField
- rfBegin :: RangeField -> Int
- rfEnd :: RangeField -> Int
- mkRangeField :: Int -> Int -> Maybe RangeField
- data CronField
- data StepField
- sfField :: StepField -> BaseField
- sfStepping :: StepField -> Int
- mkStepField :: BaseField -> Int -> Maybe StepField
- yearly :: CronSchedule
- monthly :: CronSchedule
- daily :: CronSchedule
- weekly :: CronSchedule
- hourly :: CronSchedule
- everyMinute :: CronSchedule
- serializeCronSchedule :: CronSchedule -> Text
- serializeCrontab :: Crontab -> Text
Documentation
data CronSchedule Source
Specification for a cron expression
CronSchedule | |
|
Crontab file, omitting comments.
data CrontabEntry Source
Essentially a line in a crontab file. It is either a schedule with a command after it or setting an environment variable (e.g. FOO=BAR)
newtype CronCommand Source
minuteSpec :: MinuteSpec -> CronField Source
mkHourSpec :: CronField -> Maybe HourSpec Source
mkMonthSpec :: CronField -> Maybe MonthSpec Source
data DayOfMonthSpec Source
Day of month field of a cron expression
data DayOfWeekSpec Source
Day of week field of a cron expression
Individual field of a cron expression.
Star | Matches anything |
SpecificField' SpecificField | Matches a specific value (e.g. 1) |
RangeField' RangeField | Matches a range of values (e.g. 1-3) |
specificField :: SpecificField -> Int Source
rfBegin :: RangeField -> Int Source
rfEnd :: RangeField -> Int Source
mkRangeField :: Int -> Int -> Maybe RangeField Source
sfStepping :: StepField -> Int Source
Commonly Used Schedules
Shorthand for every January 1st at midnight. Parsed with @yearly, 0 0 1 1 *
monthly :: CronSchedule Source
Shorthand for every 1st of the month at midnight. Parsed with @monthly, 0 0 1 * *
Shorthand for every day at midnight. Parsed with @daily, 0 0 * * *
Shorthand for every sunday at midnight. Parsed with @weekly, 0 0 * * 0
Shorthand for every hour on the hour. Parsed with @hourly, 0 * * * *
everyMinute :: CronSchedule Source
Shorthand for an expression that always matches. Parsed with * * * * *
Rendering
serializeCrontab :: Crontab -> Text Source