You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi
Currently yes. This choice was informed by the cron library used.
Obviously the faster the scheduler needs to run the more cpu will be used.
Making that value configurable could be an option in the future though.
Groete / Best regards
Michael van Niekerk
________________________________
Van: Zainpay ***@***.***>
Gestuur: Tuesday, November 12, 2024 1:20:57 PM
aan: mvniekerk/tokio-cron-scheduler ***@***.***>
Aa: Michael van Niekerk ***@***.***>; Mention ***@***.***>
onderwerp: [mvniekerk/tokio-cron-scheduler] repeated schedule minimum duration (Issue #88)
Hello @mvniekerk<https://github.com/mvniekerk>
Thanks for this awesome library.
I need a bit of clarification on the minimum possible value of the Duration for Job::new_repeated_async function. From the source code
it stated that a new job will only be created after the delay of 500ms
Create a new async repeated job. This is checked if it is running only after 500ms in 500ms intervals. let mut sched = JobScheduler::new(); let job = Job::new_repeated_async(Duration::from_secs(8), |_uuid, _lock| Box::pin(async move { println!("{:?} I'm repeated every 8 seconds", chrono::Utc::now()); })); sched.add(job) tokio::spawn(sched.start());
Does this mean that we cannot have a repeated scheduler with duration less than 500ms ?
Thanks
—
Reply to this email directly, view it on GitHub<#88>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAL7O75E45JMHR7NIIYNFFD2AHQBTAVCNFSM6AAAAABRT2DI7WVHI2DSMVQWIX3LMV43ASLTON2WKOZSGY2TCOBXGY2TKNY>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
No description provided.
The text was updated successfully, but these errors were encountered: