Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
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 Source #
Specification for a cron expression
CronSchedule | |
|
Instances
Crontab file, omitting comments.
Instances
Data Crontab Source # | |
Defined in System.Cron.Types gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Crontab -> c Crontab # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Crontab # toConstr :: Crontab -> Constr # dataTypeOf :: Crontab -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Crontab) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Crontab) # gmapT :: (forall b. Data b => b -> b) -> Crontab -> Crontab # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Crontab -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Crontab -> r # gmapQ :: (forall d. Data d => d -> u) -> Crontab -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Crontab -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Crontab -> m Crontab # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Crontab -> m Crontab # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Crontab -> m Crontab # | |
Generic Crontab Source # | |
Show Crontab Source # | |
Eq Crontab Source # | |
type Rep Crontab Source # | |
Defined in System.Cron.Types type Rep Crontab = D1 ('MetaData "Crontab" "System.Cron.Types" "cron-0.7.1-QNK1BZVJeT3rbMB0rRoua" 'True) (C1 ('MetaCons "Crontab" 'PrefixI 'True) (S1 ('MetaSel ('Just "crontabEntries") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [CrontabEntry]))) |
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)
Instances
data MinuteSpec Source #
Minutes field of a cron expression
Instances
Data MinuteSpec Source # | |
Defined in System.Cron.Types gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> MinuteSpec -> c MinuteSpec # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c MinuteSpec # toConstr :: MinuteSpec -> Constr # dataTypeOf :: MinuteSpec -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c MinuteSpec) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c MinuteSpec) # gmapT :: (forall b. Data b => b -> b) -> MinuteSpec -> MinuteSpec # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> MinuteSpec -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> MinuteSpec -> r # gmapQ :: (forall d. Data d => d -> u) -> MinuteSpec -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> MinuteSpec -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> MinuteSpec -> m MinuteSpec # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> MinuteSpec -> m MinuteSpec # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> MinuteSpec -> m MinuteSpec # | |
Generic MinuteSpec Source # | |
Defined in System.Cron.Types type Rep MinuteSpec :: Type -> Type # from :: MinuteSpec -> Rep MinuteSpec x # to :: Rep MinuteSpec x -> MinuteSpec # | |
Show MinuteSpec Source # | |
Defined in System.Cron.Types showsPrec :: Int -> MinuteSpec -> ShowS # show :: MinuteSpec -> String # showList :: [MinuteSpec] -> ShowS # | |
Eq MinuteSpec Source # | |
Defined in System.Cron.Types (==) :: MinuteSpec -> MinuteSpec -> Bool # (/=) :: MinuteSpec -> MinuteSpec -> Bool # | |
type Rep MinuteSpec Source # | |
Defined in System.Cron.Types type Rep MinuteSpec = D1 ('MetaData "MinuteSpec" "System.Cron.Types" "cron-0.7.1-QNK1BZVJeT3rbMB0rRoua" 'True) (C1 ('MetaCons "Minutes" 'PrefixI 'True) (S1 ('MetaSel ('Just "minuteSpec") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CronField))) |
newtype CronCommand Source #
Instances
minuteSpec :: MinuteSpec -> CronField Source #
mkMinuteSpec :: CronField -> Maybe MinuteSpec Source #
Hours field of a cron expression
Instances
Data HourSpec Source # | |
Defined in System.Cron.Types gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HourSpec -> c HourSpec # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HourSpec # toConstr :: HourSpec -> Constr # dataTypeOf :: HourSpec -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HourSpec) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HourSpec) # gmapT :: (forall b. Data b => b -> b) -> HourSpec -> HourSpec # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HourSpec -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HourSpec -> r # gmapQ :: (forall d. Data d => d -> u) -> HourSpec -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HourSpec -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HourSpec -> m HourSpec # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HourSpec -> m HourSpec # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HourSpec -> m HourSpec # | |
Generic HourSpec Source # | |
Show HourSpec Source # | |
Eq HourSpec Source # | |
type Rep HourSpec Source # | |
Defined in System.Cron.Types |
Month field of a cron expression
Instances
Data MonthSpec Source # | |
Defined in System.Cron.Types gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> MonthSpec -> c MonthSpec # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c MonthSpec # toConstr :: MonthSpec -> Constr # dataTypeOf :: MonthSpec -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c MonthSpec) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c MonthSpec) # gmapT :: (forall b. Data b => b -> b) -> MonthSpec -> MonthSpec # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> MonthSpec -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> MonthSpec -> r # gmapQ :: (forall d. Data d => d -> u) -> MonthSpec -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> MonthSpec -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> MonthSpec -> m MonthSpec # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> MonthSpec -> m MonthSpec # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> MonthSpec -> m MonthSpec # | |
Generic MonthSpec Source # | |
Show MonthSpec Source # | |
Eq MonthSpec Source # | |
type Rep MonthSpec Source # | |
Defined in System.Cron.Types |
data DayOfMonthSpec Source #
Day of month field of a cron expression
Instances
data DayOfWeekSpec Source #
Day of week field of a cron expression
Instances
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) |
Instances
Data BaseField Source # | |
Defined in System.Cron.Types gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> BaseField -> c BaseField # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c BaseField # toConstr :: BaseField -> Constr # dataTypeOf :: BaseField -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c BaseField) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BaseField) # gmapT :: (forall b. Data b => b -> b) -> BaseField -> BaseField # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> BaseField -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> BaseField -> r # gmapQ :: (forall d. Data d => d -> u) -> BaseField -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> BaseField -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> BaseField -> m BaseField # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> BaseField -> m BaseField # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> BaseField -> m BaseField # | |
Generic BaseField Source # | |
Show BaseField Source # | |
Eq BaseField Source # | |
type Rep BaseField Source # | |
Defined in System.Cron.Types type Rep BaseField = D1 ('MetaData "BaseField" "System.Cron.Types" "cron-0.7.1-QNK1BZVJeT3rbMB0rRoua" 'False) (C1 ('MetaCons "Star" 'PrefixI 'False) (U1 :: Type -> Type) :+: (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 Source #
Instances
specificField :: SpecificField -> Int Source #
mkSpecificField :: Int -> Maybe SpecificField Source #
data RangeField Source #
Instances
Data RangeField Source # | |
Defined in System.Cron.Types gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> RangeField -> c RangeField # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c RangeField # toConstr :: RangeField -> Constr # dataTypeOf :: RangeField -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c RangeField) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c RangeField) # gmapT :: (forall b. Data b => b -> b) -> RangeField -> RangeField # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> RangeField -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> RangeField -> r # gmapQ :: (forall d. Data d => d -> u) -> RangeField -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> RangeField -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> RangeField -> m RangeField # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> RangeField -> m RangeField # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> RangeField -> m RangeField # | |
Generic RangeField Source # | |
Defined in System.Cron.Types type Rep RangeField :: Type -> Type # from :: RangeField -> Rep RangeField x # to :: Rep RangeField x -> RangeField # | |
Show RangeField Source # | |
Defined in System.Cron.Types showsPrec :: Int -> RangeField -> ShowS # show :: RangeField -> String # showList :: [RangeField] -> ShowS # | |
Eq RangeField Source # | |
Defined in System.Cron.Types (==) :: RangeField -> RangeField -> Bool # (/=) :: RangeField -> RangeField -> Bool # | |
type Rep RangeField Source # | |
Defined in System.Cron.Types type Rep RangeField = D1 ('MetaData "RangeField" "System.Cron.Types" "cron-0.7.1-QNK1BZVJeT3rbMB0rRoua" '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 Source #
rfEnd :: RangeField -> Int Source #
mkRangeField :: Int -> Int -> Maybe RangeField Source #
Field BaseField | |
ListField (NonEmpty BaseField) | Matches a list of expressions. |
StepField' StepField | Matches a stepped expression, e.g. (*/2). |
Instances
Data CronField Source # | |
Defined in System.Cron.Types gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CronField -> c CronField # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CronField # toConstr :: CronField -> Constr # dataTypeOf :: CronField -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CronField) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CronField) # gmapT :: (forall b. Data b => b -> b) -> CronField -> CronField # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CronField -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CronField -> r # gmapQ :: (forall d. Data d => d -> u) -> CronField -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> CronField -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> CronField -> m CronField # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CronField -> m CronField # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CronField -> m CronField # | |
Generic CronField Source # | |
Show CronField Source # | |
Eq CronField Source # | |
type Rep CronField Source # | |
Defined in System.Cron.Types type Rep CronField = D1 ('MetaData "CronField" "System.Cron.Types" "cron-0.7.1-QNK1BZVJeT3rbMB0rRoua" '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
Data StepField Source # | |
Defined in System.Cron.Types gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> StepField -> c StepField # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c StepField # toConstr :: StepField -> Constr # dataTypeOf :: StepField -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c StepField) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c StepField) # gmapT :: (forall b. Data b => b -> b) -> StepField -> StepField # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> StepField -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> StepField -> r # gmapQ :: (forall d. Data d => d -> u) -> StepField -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> StepField -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> StepField -> m StepField # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> StepField -> m StepField # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> StepField -> m StepField # | |
Generic StepField Source # | |
Show StepField Source # | |
Eq StepField Source # | |
type Rep StepField Source # | |
Defined in System.Cron.Types type Rep StepField = D1 ('MetaData "StepField" "System.Cron.Types" "cron-0.7.1-QNK1BZVJeT3rbMB0rRoua" '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 Source #
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
serializeCrontab :: Crontab -> Text Source #