| Crates.io | systemd-user-timers-lib |
| lib.rs | systemd-user-timers-lib |
| version | 1.1.3 |
| created_at | 2026-01-06 22:29:56.97959+00 |
| updated_at | 2026-01-07 01:40:00.726128+00 |
| description | A simple way to make systemd user timers. This is the library, not the CLI. |
| homepage | https://systemd-user-timers.galacticsystemsindevelopment.xyz |
| repository | https://github.com/galacticSystemsInDevelopment/systemd-user-timers-lib |
| max_upload_size | |
| id | 2027034 |
| size | 14,783 |
Systemd User Timers Library
This is the library. For the app, see https://github.com/galacticSystemsInDevelopment/systemd-user-timers.
cargo add systemd-user-timers-lib
use systemd_user_timers_lib::timers::Timer;
fn main() {
let timer = Timer {
name: "notify".to_string(),
description: "5 Minute Notify Timer".to_string(),
schedule: "5min".to_string(),
executable: "/home/user/notify.sh",
exec_if_missed: false,
single_use: false,
recurring: false,
on_calendar: false,
from_boot: false,
normal_service: false,
service: None,
already_made_service: false,
enable_at_login: false,
start_after_create: true,
};
println!("{}", systemd_user_timers_lib::add_timer:add_timer(timer));
}
fn main() {
let output = systemd_user_timers_lib::start::start("notify").unwrap_or_else(|e| {
eprintln!("Error listing timers: {}", e);
String::new() // Returning an empty string on error
});
if !output.is_empty() {
println!("{}", output); // Print the output
}
}
fn main() {
println!("{}", systemd_user_timers_lib::stop::stop("notify").unwrap());
}
fn main() {
let output = systemd_user_timers_lib::list_timers::list_timers().unwrap_or_else(|e| {
eprintln!("Error listing timers: {}", e);
String::new() // Returning an empty string on error
});
if !output.is_empty() {
println!("{}", output); // Print the output
}
}