crontab v0.8.0 Crontab.CronDateChecker
This Module is used to check a Crontab.CronInterval against a given date.
Summary
Functions
matches_date(arg1, execution_date)
matches_date(Crontab.ExtendedCronInterval.all_t, NaiveDateTime.t) :: boolean
matches_date(Crontab.ExtendedCronInterval.condition_list, NaiveDateTime.t) :: boolean
Check a condition list against a given date.
Examples
iex> Crontab.CronDateChecker.matches_date [{:hour, [{:"/", :*, 4}, 7]}], ~N[2004-04-16 04:07:08]
true
matches_date(interval, list, execution_date)
matches_date(Crontab.ExtendedCronInterval.interval, Crontab.ExtendedCronInterval.condition_list, NaiveDateTime.t) :: boolean
Check a condition against a given date.
Examples
iex> Crontab.CronDateChecker.matches_date :hour, [{:"/", :*, 4}, 7], ~N[2004-04-16 04:07:08]
true
iex> Crontab.CronDateChecker.matches_date :hour, [8], ~N[2004-04-16 04:07:08]
false