cron-0.6.0: 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

newtype Crontab Source #

Crontab file, omitting comments.

Constructors

Crontab 

Instances

Eq Crontab Source # 

Methods

(==) :: Crontab -> Crontab -> Bool #

(/=) :: Crontab -> Crontab -> Bool #

Show Crontab Source # 
Generic Crontab Source # 

Associated Types

type Rep Crontab :: * -> * #

Methods

from :: Crontab -> Rep Crontab x #

to :: Rep Crontab x -> Crontab #

type Rep Crontab Source # 
type Rep Crontab = D1 (MetaData "Crontab" "System.Cron.Types" "cron-0.6.0-E1PrDGArSaW2RwzYHZc34i" True) (C1 (MetaCons "Crontab" PrefixI True) (S1 (MetaSel (Just Symbol "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)

data MinuteSpec Source #

Minutes field of a cron expression

Instances

Eq MinuteSpec Source # 
Show MinuteSpec Source # 
Generic MinuteSpec Source # 

Associated Types

type Rep MinuteSpec :: * -> * #

type Rep MinuteSpec Source # 
type Rep MinuteSpec = D1 (MetaData "MinuteSpec" "System.Cron.Types" "cron-0.6.0-E1PrDGArSaW2RwzYHZc34i" True) (C1 (MetaCons "Minutes" PrefixI True) (S1 (MetaSel (Just Symbol "minuteSpec") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 CronField)))

data HourSpec Source #

Hours field of a cron expression

Instances

Eq HourSpec Source # 
Show HourSpec Source # 
Generic HourSpec Source # 

Associated Types

type Rep HourSpec :: * -> * #

Methods

from :: HourSpec -> Rep HourSpec x #

to :: Rep HourSpec x -> HourSpec #

type Rep HourSpec Source # 
type Rep HourSpec = D1 (MetaData "HourSpec" "System.Cron.Types" "cron-0.6.0-E1PrDGArSaW2RwzYHZc34i" True) (C1 (MetaCons "Hours" PrefixI True) (S1 (MetaSel (Just Symbol "hourSpec") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 CronField)))

data MonthSpec Source #

Month field of a cron expression

Instances

Eq MonthSpec Source # 
Show MonthSpec Source # 
Generic MonthSpec Source # 

Associated Types

type Rep MonthSpec :: * -> * #

type Rep MonthSpec Source # 
type Rep MonthSpec = D1 (MetaData "MonthSpec" "System.Cron.Types" "cron-0.6.0-E1PrDGArSaW2RwzYHZc34i" True) (C1 (MetaCons "Months" PrefixI True) (S1 (MetaSel (Just Symbol "monthSpec") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 CronField)))

data DayOfMonthSpec Source #

Day of month field of a cron expression

data DayOfWeekSpec Source #

Day of week field of a cron expression

Instances

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 SpecificField Source #

Instances

Eq SpecificField Source # 
Show SpecificField Source # 
Generic SpecificField Source # 

Associated Types

type Rep SpecificField :: * -> * #

type Rep SpecificField Source # 
type Rep SpecificField = D1 (MetaData "SpecificField" "System.Cron.Types" "cron-0.6.0-E1PrDGArSaW2RwzYHZc34i" True) (C1 (MetaCons "SpecificField" PrefixI True) (S1 (MetaSel (Just Symbol "specificField") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)))

data RangeField Source #

Instances

data StepField Source #

Instances

Eq StepField Source # 
Show StepField Source # 
Generic StepField Source # 

Associated Types

type Rep StepField :: * -> * #

type Rep StepField Source # 
type Rep StepField = D1 (MetaData "StepField" "System.Cron.Types" "cron-0.6.0-E1PrDGArSaW2RwzYHZc34i" False) (C1 (MetaCons "StepField" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "sfField") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 BaseField)) (S1 (MetaSel (Just Symbol "sfStepping") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int))))

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

Converting to human-readable string