Changed static time. Also printing static time for now
This commit is contained in:
@@ -6,8 +6,10 @@ use cron_tab::Cron;
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let chip = Arc::new(Mutex::new(Chip::new("/dev/gpiochip0")?));
|
||||
let mut cron = Cron::new(chrono::Local);
|
||||
let static_time = "0 30 7 * * *";
|
||||
|
||||
let job_result = cron.add_fn("0 16 20 * * * *", move || {
|
||||
println!("Adding alarm {}", static_time);
|
||||
let job_result = cron.add_fn(static_time, move || {
|
||||
let mut guard = chip.lock().unwrap();
|
||||
alarm(&mut*guard).unwrap();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user