jamesmh / coravel

Near-zero config .NET library that makes advanced application features like Task Scheduling, Caching, Queuing, Event Broadcasting, and more a breeze!
https://docs.coravel.net/Installation/
MIT License
3.63k stars 243 forks source link

Fix Missed Ticks In Scheduler #359

Closed jamesmh closed 3 months ago

jamesmh commented 3 months ago

See https://github.com/jamesmh/coravel/issues/187#issuecomment-1904113777

This adds the fix for this issue.

It is possible for the schedule to skip some ticks, then while catching up and processing those "old" ticks then begins processing the next tick concurrently. It's a trade-off, and is similar to how it worked before this fix - processing of ticks occurs concurrently and aren't tied to each other. This is where using PreventOverlap() can help to avoid the same jobs stepping over itself.