cron-0.4.2: Cron datatypes and Attoparsec parser

Safe HaskellNone
LanguageHaskell2010

System.Cron.Types

Contents

Synopsis

Documentation

data CronSchedule Source

Specification for a cron expression

Constructors

CronSchedule 

Fields

minute :: MinuteSpec

Which minutes to run. First field in a cron specification.

hour :: HourSpec

Which hours to run. Second field in a cron specification.

dayOfMonth :: DayOfMonthSpec

Which days of the month to run. Third field in a cron specification.

month :: MonthSpec

Which months to run. Fourth field in a cron specification.

dayOfWeek :: DayOfWeekSpec

Which days of the week to run. Fifth field in a cron specification.

newtype Crontab Source

Crontab file, omitting comments.

Constructors

Crontab 

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)

data MinuteSpec Source

Minutes field of a cron expression

data HourSpec Source

Hours field of a cron expression

data MonthSpec Source

Month field of a cron expression

data DayOfWeekSpec Source

Day of week field of a cron expression

data BaseField Source

Individual field of a cron expression.

Constructors

Star

Matches anything

SpecificField' SpecificField

Matches a specific value (e.g. 1)

RangeField' RangeField

Matches a range of values (e.g. 1-3)

data CronField Source

Constructors

Field BaseField 
ListField (NonEmpty BaseField)

Matches a list of expressions.

StepField' StepField

Matches a stepped expression, e.g. (*/2).

Commonly Used Schedules

yearly :: CronSchedule Source

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 * *

daily :: CronSchedule Source

Shorthand for every day at midnight. Parsed with @daily, 0 0 * * *

weekly :: CronSchedule Source

Shorthand for every sunday at midnight. Parsed with @weekly, 0 0 * * 0

hourly :: CronSchedule Source

Shorthand for every hour on the hour. Parsed with @hourly, 0 * * * *

everyMinute :: CronSchedule Source

Shorthand for an expression that always matches. Parsed with * * * * *

Rendering