| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
System.Cron.Types
Synopsis
- 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 #
Specification for a cron expression
Constructors
| CronSchedule | |
Fields
| |
Instances
Crontab file, omitting comments.
Constructors
| Crontab | |
Fields | |
Instances
| Eq Crontab # | |
| Show Crontab # | |
| Generic Crontab # | |
| type Rep Crontab # | |
Defined in System.Cron.Types type Rep Crontab = D1 (MetaData "Crontab" "System.Cron.Types" "cron-0.6.1-HGOoNc0Ul4Z74ncSJBwaXx" True) (C1 (MetaCons "Crontab" PrefixI True) (S1 (MetaSel (Just "crontabEntries") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [CrontabEntry]))) | |
data CrontabEntry #
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)
Constructors
| CommandEntry CronSchedule CronCommand | |
| EnvVariable Text Text |
Instances
data MinuteSpec #
Minutes field of a cron expression
Instances
| Eq MinuteSpec # | |
Defined in System.Cron.Types | |
| Show MinuteSpec # | |
Defined in System.Cron.Types Methods showsPrec :: Int -> MinuteSpec -> ShowS # show :: MinuteSpec -> String # showList :: [MinuteSpec] -> ShowS # | |
| Generic MinuteSpec # | |
Defined in System.Cron.Types Associated Types type Rep MinuteSpec :: * -> * # | |
| type Rep MinuteSpec # | |
Defined in System.Cron.Types type Rep MinuteSpec = D1 (MetaData "MinuteSpec" "System.Cron.Types" "cron-0.6.1-HGOoNc0Ul4Z74ncSJBwaXx" True) (C1 (MetaCons "Minutes" PrefixI True) (S1 (MetaSel (Just "minuteSpec") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 CronField))) | |
newtype CronCommand #
Constructors
| CronCommand | |
Fields
| |
Instances
| Eq CronCommand # | |
Defined in System.Cron.Types | |
| Ord CronCommand # | |
Defined in System.Cron.Types Methods compare :: CronCommand -> CronCommand -> Ordering # (<) :: CronCommand -> CronCommand -> Bool # (<=) :: CronCommand -> CronCommand -> Bool # (>) :: CronCommand -> CronCommand -> Bool # (>=) :: CronCommand -> CronCommand -> Bool # max :: CronCommand -> CronCommand -> CronCommand # min :: CronCommand -> CronCommand -> CronCommand # | |
| Show CronCommand # | |
Defined in System.Cron.Types Methods showsPrec :: Int -> CronCommand -> ShowS # show :: CronCommand -> String # showList :: [CronCommand] -> ShowS # | |
| Generic CronCommand # | |
Defined in System.Cron.Types Associated Types type Rep CronCommand :: * -> * # | |
| type Rep CronCommand # | |
Defined in System.Cron.Types type Rep CronCommand = D1 (MetaData "CronCommand" "System.Cron.Types" "cron-0.6.1-HGOoNc0Ul4Z74ncSJBwaXx" True) (C1 (MetaCons "CronCommand" PrefixI True) (S1 (MetaSel (Just "cronCommand") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text))) | |
minuteSpec :: MinuteSpec -> CronField #
mkMinuteSpec :: CronField -> Maybe MinuteSpec #
Hours field of a cron expression
mkHourSpec :: CronField -> Maybe HourSpec #
Month field of a cron expression
mkMonthSpec :: CronField -> Maybe MonthSpec #
data DayOfMonthSpec #
Day of month field of a cron expression
Instances
| Eq DayOfMonthSpec # | |
Defined in System.Cron.Types Methods (==) :: DayOfMonthSpec -> DayOfMonthSpec -> Bool # (/=) :: DayOfMonthSpec -> DayOfMonthSpec -> Bool # | |
| Show DayOfMonthSpec # | |
Defined in System.Cron.Types Methods showsPrec :: Int -> DayOfMonthSpec -> ShowS # show :: DayOfMonthSpec -> String # showList :: [DayOfMonthSpec] -> ShowS # | |
| Generic DayOfMonthSpec # | |
Defined in System.Cron.Types Associated Types type Rep DayOfMonthSpec :: * -> * # Methods from :: DayOfMonthSpec -> Rep DayOfMonthSpec x # to :: Rep DayOfMonthSpec x -> DayOfMonthSpec # | |
| type Rep DayOfMonthSpec # | |
Defined in System.Cron.Types type Rep DayOfMonthSpec = D1 (MetaData "DayOfMonthSpec" "System.Cron.Types" "cron-0.6.1-HGOoNc0Ul4Z74ncSJBwaXx" True) (C1 (MetaCons "DaysOfMonth" PrefixI True) (S1 (MetaSel (Just "dayOfMonthSpec") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 CronField))) | |
data DayOfWeekSpec #
Day of week field of a cron expression
Instances
| Eq DayOfWeekSpec # | |
Defined in System.Cron.Types Methods (==) :: DayOfWeekSpec -> DayOfWeekSpec -> Bool # (/=) :: DayOfWeekSpec -> DayOfWeekSpec -> Bool # | |
| Show DayOfWeekSpec # | |
Defined in System.Cron.Types Methods showsPrec :: Int -> DayOfWeekSpec -> ShowS # show :: DayOfWeekSpec -> String # showList :: [DayOfWeekSpec] -> ShowS # | |
| Generic DayOfWeekSpec # | |
Defined in System.Cron.Types Associated Types type Rep DayOfWeekSpec :: * -> * # | |
| type Rep DayOfWeekSpec # | |
Defined in System.Cron.Types type Rep DayOfWeekSpec = D1 (MetaData "DayOfWeekSpec" "System.Cron.Types" "cron-0.6.1-HGOoNc0Ul4Z74ncSJBwaXx" True) (C1 (MetaCons "DaysOfWeek" PrefixI True) (S1 (MetaSel (Just "dayOfWeekSpec") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 CronField))) | |
dayOfWeekSpec :: DayOfWeekSpec -> CronField #
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) |
Instances
| Eq BaseField # | |
| Show BaseField # | |
| Generic BaseField # | |
| type Rep BaseField # | |
Defined in System.Cron.Types type Rep BaseField = D1 (MetaData "BaseField" "System.Cron.Types" "cron-0.6.1-HGOoNc0Ul4Z74ncSJBwaXx" False) (C1 (MetaCons "Star" PrefixI False) (U1 :: * -> *) :+: (C1 (MetaCons "SpecificField'" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 SpecificField)) :+: C1 (MetaCons "RangeField'" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 RangeField)))) | |
data SpecificField #
Instances
| Eq SpecificField # | |
Defined in System.Cron.Types Methods (==) :: SpecificField -> SpecificField -> Bool # (/=) :: SpecificField -> SpecificField -> Bool # | |
| Show SpecificField # | |
Defined in System.Cron.Types Methods showsPrec :: Int -> SpecificField -> ShowS # show :: SpecificField -> String # showList :: [SpecificField] -> ShowS # | |
| Generic SpecificField # | |
Defined in System.Cron.Types Associated Types type Rep SpecificField :: * -> * # | |
| type Rep SpecificField # | |
Defined in System.Cron.Types type Rep SpecificField = D1 (MetaData "SpecificField" "System.Cron.Types" "cron-0.6.1-HGOoNc0Ul4Z74ncSJBwaXx" True) (C1 (MetaCons "SpecificField" PrefixI True) (S1 (MetaSel (Just "specificField") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int))) | |
specificField :: SpecificField -> Int #
mkSpecificField :: Int -> Maybe SpecificField #
data RangeField #
Instances
| Eq RangeField # | |
Defined in System.Cron.Types | |
| Show RangeField # | |
Defined in System.Cron.Types Methods showsPrec :: Int -> RangeField -> ShowS # show :: RangeField -> String # showList :: [RangeField] -> ShowS # | |
| Generic RangeField # | |
Defined in System.Cron.Types Associated Types type Rep RangeField :: * -> * # | |
| type Rep RangeField # | |
Defined in System.Cron.Types type Rep RangeField = D1 (MetaData "RangeField" "System.Cron.Types" "cron-0.6.1-HGOoNc0Ul4Z74ncSJBwaXx" False) (C1 (MetaCons "RangeField" PrefixI True) (S1 (MetaSel (Just "rfBegin") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int) :*: S1 (MetaSel (Just "rfEnd") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int))) | |
rfBegin :: RangeField -> Int #
rfEnd :: RangeField -> Int #
mkRangeField :: Int -> Int -> Maybe RangeField #
Constructors
| Field BaseField | |
| ListField (NonEmpty BaseField) | Matches a list of expressions. |
| StepField' StepField | Matches a stepped expression, e.g. (*/2). |
Instances
| Eq CronField # | |
| Show CronField # | |
| Generic CronField # | |
| type Rep CronField # | |
Defined in System.Cron.Types type Rep CronField = D1 (MetaData "CronField" "System.Cron.Types" "cron-0.6.1-HGOoNc0Ul4Z74ncSJBwaXx" False) (C1 (MetaCons "Field" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 BaseField)) :+: (C1 (MetaCons "ListField" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (NonEmpty BaseField))) :+: C1 (MetaCons "StepField'" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 StepField)))) | |
Instances
| Eq StepField # | |
| Show StepField # | |
| Generic StepField # | |
| type Rep StepField # | |
Defined in System.Cron.Types type Rep StepField = D1 (MetaData "StepField" "System.Cron.Types" "cron-0.6.1-HGOoNc0Ul4Z74ncSJBwaXx" False) (C1 (MetaCons "StepField" PrefixI True) (S1 (MetaSel (Just "sfField") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 BaseField) :*: S1 (MetaSel (Just "sfStepping") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int))) | |
sfStepping :: StepField -> Int #
Commonly Used Schedules
yearly :: CronSchedule #
Shorthand for every January 1st at midnight. Parsed with @yearly, 0 0 1 1 *
monthly :: CronSchedule #
Shorthand for every 1st of the month at midnight. Parsed with @monthly, 0 0 1 * *
daily :: CronSchedule #
Shorthand for every day at midnight. Parsed with @daily, 0 0 * * *
weekly :: CronSchedule #
Shorthand for every sunday at midnight. Parsed with @weekly, 0 0 * * 0
hourly :: CronSchedule #
Shorthand for every hour on the hour. Parsed with @hourly, 0 * * * *
Shorthand for an expression that always matches. Parsed with * * * * *
Rendering
serializeCrontab :: Crontab -> Text #