[−][src]Function cron_parser::parse
pub fn parse(cron: &str, dt: DateTime<Utc>) -> Result<DateTime<Utc>, ParseError>
Parse cron syntax
┌───────────────────── minute (0 - 59)
│ ┌─────────────────── hour (0 - 23)
│ │ ┌───────────────── dom (1 - 31) day of month
│ │ │ ┌─────────────── month (1 - 12)
│ │ │ │ ┌───────────── dow (0 - 6 or Sun - Sat) day of week (Sunday to Saturday)
│ │ │ │ │
│ │ │ │ │
│ │ │ │ │
* * * * * command to execute
Example
use cron_parser::parse; use chrono::Utc; fn main() { assert!(parse("*/5 * * * *", Utc::now()).is_ok()); }