mvniekerk / tokio-cron-scheduler

Schedule tasks on Tokio using cron-like annotation
Apache License 2.0
453 stars 54 forks source link

Run tasks non-concurrently? #50

Open Zerowalker opened 11 months ago

Zerowalker commented 11 months ago

Is it possible to make sure a task doesn't run concurrent with itself?

Say a task repeats every 10 seconds, and sometimes it takes 15 seconds to complete so the next one starts while the last one is still running. That I would like to prevent if possible, so instead it has to wait till the last one is done and will then execute at the next tick or something.

mvniekerk commented 5 months ago

Ok, so you would like to have some of blocker that keeps a job from running with itself? Interesting.

Thanks for the issue, I'll check what I can do

Zerowalker commented 5 months ago

Yeah, it's not a big thing right now personally, but I still find it to be a good feature to look into. Though if i'm the only one that thinks so, it might not be that good a feature anyhow, so take it with a grain of salt;p