tiny-native-scheduler 0.1.0

Tiny helper to schedule tasks to run at a specific time using `at` on Unix and `schtasks` on Windows.
docs.rs failed to build tiny-native-scheduler-0.1.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: tiny-native-scheduler-0.1.1

tiny native scheduler

  • This is a tiny native scheduler for the Rust programming language. It uses schtasks to schedule tasks on Windows. and at on Unix.

Installation

cargo install tiny_scheduler

Or add this to your Cargo.toml:

[dependencies]
tiny_scheduler = "0.1.0"

Usage

use tiny_scheduler::execute_command_in_x_minutes;

fn main() {
    execute_command_in_x_minutes("cargo install tiny_scheduler", 2);
}

Documentation

execute_command_in_x_minutes

Execute a command in x minutes using at or schtasks depending on the OS.

Arguments

  • command - The command to execute.
  • minutes - The amount of minutes to wait before executing the command.

Example

use execute_command_in_x_minutes::execute_command_in_x_minutes;

execute_command_in_x_minutes("cargo install cargo-update", 5).unwrap();

Errors

This function will return an error if the command fails to execute.