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
Originally posted by FireSmack September 10, 2023
I have a job set to run every 5 minutes:
s := gocron.NewScheduler(time.UTC)
job, err := s.Every(5).Minutes().Do(task)
if err != nil {
log.Fatalf("Job %v, Error: %v", job, err)
}
I do not use WaitForSchedule() or WaitForScheduleAll().
I would like my task to always run 5 minutes after the previous iteration finishes, not every 5 minutes regardless of how long the previous run took.
Example:
Let's say the first execution of my job starts at 09:00:10 and ends at 09:00:20. The next execution will start at 9:05:10. However, is it possible to have the next execution start 5 minutes after the previous one finishes, so that the next one starts at 9:05:20? And then if that one finished at 09:05:35, I would want the following one to start at 09:10:35, not at 09:10:10. Is this possible?
The text was updated successfully, but these errors were encountered:
JohnRoesler
changed the title
FEATURE: Interval job to optionally include job duration
[FEATURE] Interval job to optionally include job duration
May 24, 2024
JohnRoesler
changed the title
[FEATURE] Interval job to optionally include job duration
[FEATURE] - Interval job to optionally include job duration
May 24, 2024
Discussed in #564
Originally posted by FireSmack September 10, 2023
I have a job set to run every 5 minutes:
I do not use
WaitForSchedule()
orWaitForScheduleAll()
.I would like my task to always run 5 minutes after the previous iteration finishes, not every 5 minutes regardless of how long the previous run took.
Example:
Let's say the first execution of my job starts at 09:00:10 and ends at 09:00:20. The next execution will start at 9:05:10. However, is it possible to have the next execution start 5 minutes after the previous one finishes, so that the next one starts at 9:05:20? And then if that one finished at 09:05:35, I would want the following one to start at 09:10:35, not at 09:10:10. Is this possible?
The text was updated successfully, but these errors were encountered: