crontab v0.8.0 Crontab.CronInterval

This is the Crontab.CronInterval module / struct.

Summary

Functions

Defines the Cron Interval

Convert Crontab.CronInterval struct to Tuple List

Types

condition()
condition() :: {interval, [value]}
condition_list()
condition_list() :: [condition]
day()
day() :: 0..31
hour()
hour() :: 0..23
interval()
interval() :: :minute | :hour | :day | :month | :weekday | :year
min_max()
min_max() :: {:-, time_unit, time_unit}
minute()
minute() :: 0..59
month()
month() :: 1..12
t()
t() :: %Crontab.CronInterval{day: term, hour: term, minute: term, month: term, weekday: term, year: term}
time_unit()
value()
value ::
  time_unit |
  :* |
  :L |
  {:L, value} |
  {:/, time_unit | :* | min_max, pos_integer} |
  min_max |
  {:W, time_unit | :L}
weekday()
weekday() :: 0..7
year()
year() :: integer

Functions

__struct__()

Defines the Cron Interval

* * * * * *
| | | | | |
| | | | | +-- :year Year                 (range: 1900-3000)
| | | | +---- :weekday Day of the Week   (range: 1-7, 1 standing for Monday)
| | | +------ :month Month of the Year   (range: 1-12)
| | +-------- :day Day of the Month      (range: 1-31)
| +---------- :hour Hour                 (range: 0-23)
+------------ :minute Minute             (range: 0-59)
to_condition_list(cron_interval)
to_condition_list(t) :: condition_list

Convert Crontab.CronInterval struct to Tuple List

Examples

iex> Crontab.CronInterval.to_condition_list %Crontab.CronInterval{minute: [1], hour: [2], day: [3], month: [4], weekday: [5], year: [6]}
[ {:minute, [1]},
  {:hour, [2]},
  {:day, [3]},
  {:month, [4]},
  {:weekday, [5]},
  {:year, [6]}]