planif is a builder pattern wrapper around the windows task scheduler API (windows-rs).

Functionality

The planif crate provides an ergonomic builder over top of the Win32 Task Scheduler API.

The builder supports the following trigger types: - [x] Boot - [x] Daily - [X] Event - [X] Idle - [x] Logon - [X] MonthlyDOW - [x] Monthly - [X] Registration - [x] Time - [x] Weekly

Usage

Add this to your Cargo.toml file: [dependencies] planif = "0.2"

Example

```rust use chrono::prelude::*; use planif::schedule::TaskCreationFlags; use planif::schedule_builder::{Action, ScheduleBuilder};

fn main() -> Result<(), Box> { let sb = ScheduleBuilder::new().unwrap(); sb.createdaily() .author("Matt")? .description("Test Trigger")? .trigger("testtrigger", true)? .daysinterval(1)? .action(Action::new("test", "notepad.exe", "", ""))? .startboundary(&Local::now().to_rfc3339())? .build()? .register("TaskName", TaskCreationFlags::CreateOrUpdate as i32)?; Ok(()) } ```

For more examples, refer to the planif/examples folder. The folder contains code for creating each of the triggers.

Trigger settings

All settings are available for the tasks.

The documentation contains all relevant information from the Microsoft Task Scheduler documentation.

Changelog

See the changelog file.