Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 3f85a66

Browse files
author
Vladimir Ershov
committed
always start job in next minute
1 parent 7e974b5 commit 3f85a66

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/scheduler_manager.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,14 @@ TimestampTz *scheduler_calc_next_task_time(scheduler_task_t *task, TimestampTz s
643643
return NULL;
644644
}
645645

646+
/* to avoid to set job on minute has already passed we add 1 minute */
646647
curr = start;
648+
#ifdef HAVE_INT64_TIMESTAMP
649+
curr += USECS_PER_MINUTE;
650+
#else
651+
curr += SECS_PER_MINUTE;
652+
#endif
653+
647654
nextarray = worker_alloc(sizeof(TimestampTz) * REALLOC_STEP);
648655
convert_rule_to_cron(task->rule, cron);
649656

0 commit comments

Comments
 (0)