Does gocron provide a lock between two jobs? #200
Unanswered
Chen840302
asked this question in
Q&A
Replies: 1 comment
-
With separate jobs - no. There is currently no locking mechanism supported. There is a feature request to support locking multiple instances of the same job #181 However, it looks to me like you're asking about locking based on the actual function being the same rather than the job. The library doesn't keep track of what the functions are beyond that it's an interface and the name of the function so it can be called. Equality isn't established at this point. I'm curious, what's the usefulness of this locking ability? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
For example, If I has two jobs like following:
scheduler.every(5).seconds().Do(funcA)
scheduler.every(6).seconds().Do(funcA)
They will execute at the same time at the 30 second,
Is there a way to execute only one of them?
Beta Was this translation helpful? Give feedback.
All reactions