Crate cronchik

Crate cronchik 

Source
Expand description

Simple cron expression parser.

§Syntax

<minutes> <hours> <days of month> <months> <days of week>

  • minute is integer in range 0..=59;
  • hour is integer in range 0..=23;
  • day of month is integer in range 1..=31;
  • month is integer in range 1..=12 or textual representation like JAN or DEC;
  • day of week is integer in range 0..=6 or textual representation like SUN or SAT;

§Features

  • std - Enables use of std library types and traits.
  • serde - Enables serialization/deserialization.
  • time - Enables schedule calculation using time03 crate.

Re-exports§

pub extern crate time;

Structs§

CronSchedule
Cron schedule.
DayOfMonth
Second of the minute.
Hour
Hour of the day.
Minute
Minute of the hour.

Enums§

Day
Day of the week.
InvalidExpr
Describes potential error within expression
Month
Month of the year.
ParseError
Cron expression parser error

Constants§

DAILY
Cron expression to run once a day at midnight.
HOURLY
Cron expression to run once a hour.
MONTHLY
Cron expression to run once a month at midnight of first day.
WEEKLY
Cron expression to run once a week at midnight of the Sunday.
YEARLY
Cron expression to run once a year at midnight of January 1st.

Functions§

parse_cron_from_time
Gets schedule after time.
parse_cron_from_time_now
Gets schedule after current time in UTC.