schedule-rs
schedule-rs copied to clipboard
Time Zone Support
| Name | About | Title | Label |
|---|---|---|---|
| Feature Request | Propose a change that introduces a new functionality that supports task scheduling with timezone | Time Zone Support | request |
I am creating scheduled tasks to be executed on a remote server with a different time zone from where I am and I want to execute the tasks with reference to where I am
a.add(|| {
println!("run the first day of every month at 0 o'clock London :: {}", UTC::now());
}).schedule("0 0 0 1 * *").time_zone("Europe/London").unwrap();
// Run every minute
a.add(|| {
println!("run the first day of every month at 0 o'clock New York :: {}", UTC::now());
}).schedule("0 0 0 1 * *").time_zone("America/New_York").unwrap();
// Run every hour
a.add(|| {
println!("at hour :: {}", UTC::now());
}).schedule("0 0 * * * *").unwrap();