cron-when 0.5.3

A CLI tool to parse cron expressions and display next execution times with human-readable durations
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::{crontab, output};
use anyhow::Result;
use tracing::{info, instrument};

/// Execute crontab parsing action
///
/// # Errors
///
/// Returns an error if crontab parsing or display fails
#[instrument(level = "info", fields(verbose = %verbose, color = %color))]
pub fn execute(verbose: bool, color: bool) -> Result<()> {
    info!("Parsing current user's crontab");
    let entries = crontab::parse_current()?;
    output::display_entries(&entries, verbose, color)?;
    Ok(())
}