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
I can imagine you'd need a way to write the result of each job to a persistent store, and then as part of the scheduler check for jobs in the store and make sure that they have run at the required time and if not run them immediately.
There is an accepted proposal golang/go#36141 for Go to add a concept of External time, which is akin to "real time" that will solve this issue in gocron. Until that point, programs will just need to be restarted in the event of a machine going to sleep.
Let's say I have a one-time scheduler that is created using
gocron.NewScheduler().At()
that is set to run at 1 PM (say)Now suppose the computer goes to sleep at 12 PM and is back online at 2 PM.
Does the job actually execute once the system is back online? Or does it ignore it since time has passed?
If it doesn't execute, how do I ensure that it will run once the user wakes up from sleep??
The text was updated successfully, but these errors were encountered: