crontab v0.5.2 Crontab.CronFormatParser

Parse string like * * * * * * to a %Crontab.CronInterval{}.

Summary

Functions

Parse string like * * * * * * to a %Crontab.CronInterval{}

Functions

parse(cron_format)

Parse string like * * * * * * to a %Crontab.CronInterval{}.

Examples

iex> Crontab.CronFormatParser.parse "* * * * *"
{:ok,
  %Crontab.CronInterval{day: [:*], hour: [:*], minute: [:*],
  month: [:*], weekday: [:*], year: [:*]}}

iex> Crontab.CronFormatParser.parse "fooo"
{:error, "Can't parse fooo as interval minute."}