crontab v0.8.0 Crontab.CronFormatParser
Parse string like * * * * * *
to a %Crontab.CronInterval{}
or %Crontab.ExtendedCronInterval{}
.
Summary
Functions
Parse string like * * * * * *
to a %Crontab.CronInterval{}
Types
Functions
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 "* * * * *", true
{:ok,
%Crontab.ExtendedCronInterval{day: [:*], hour: [:*], minute: [:*],
month: [:*], weekday: [:*], year: [:*], second: [:*]}}
iex> Crontab.CronFormatParser.parse "fooo"
{:error, "Can't parse fooo as interval minute."}