Function cronrunner::crontab::make_instance

source ·
pub fn make_instance() -> Result<Crontab, ReadError>
Expand description

Create an instance of Crontab.

This helper reads the current user’s crontab and creates a Crontab instance out of it.

§Examples

use cronrunner::crontab;

let crontab = match crontab::make_instance() {
    Ok(crontab) => crontab,
    Err(_) => return (),
};

§Errors

Will forward ReadError from Reader if any.