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
_Let's say you have a task which you execute every 15 minutes and which usually takes few minutes to run. Moreover, you want to execute it at most once per 15 minutes. In that case, you can configure it like this:
why does the value of lockAtLeastFor is 14m instead of 1m or 2m? After all,according to doc,Its main purpose is to prevent execution from multiple nodes in case of really short tasks and clock difference between the nodes
does the value of lockAtMostFor must less than 15m in the example? because of the @scheduled(cron = "0 */15 * * * *")
The text was updated successfully, but these errors were encountered:
Dear team,
Thanks a lot for your distribution,
There is an example in the README.md file
_Let's say you have a task which you execute every 15 minutes and which usually takes few minutes to run. Moreover, you want to execute it at most once per 15 minutes. In that case, you can configure it like this:
import net.javacrumbs.shedlock.core.SchedulerLock;
@scheduled(cron = "0 */15 * * * *")
@SchedulerLock(name = "scheduledTaskName", lockAtMostFor = "14m", lockAtLeastFor = "14m")
public void scheduledTask() {
// do something
}_
I am a bit confused that:
The text was updated successfully, but these errors were encountered: