cancel
Showing results for 
Search instead for 
Did you mean: 

Specifying the start time for an event schedule

VolkerBarth
Contributor
2,145

Yesterday, I have altered the schedule for an event to run every 12 instead of every 24 hours. The original start time was 23:40, and I left that unchanged. So only the EVERY clause was changed.

Now I notice that the event has not run today at 11:40 (as I had expected), and the next scheduled time (as given by select db_extended_property('NextScheduleTime', 'MyEvent')) is tonight.

Does it mean that when using a period < 24 hours, I have to specify the first start time for the according day, since there's no automatic "day-overflow" calculation?

I.e. would I have to change my schedule to

start time '11:40'
every 12 hours

to have it run twice a day?

Accepted Solutions (1)

Accepted Solutions (1)

VolkerBarth
Contributor

Well, I should have read the docs, sigh...

To cite:

START TIME clause
The first scheduled time for each day on which the event is scheduled.
...
EVERY clause
An interval between successive scheduled events. Scheduled events occur only after the START TIME for the day, or in the range specified by BETWEEN ... AND.

So, yes, it seems that there's no automatic day-overflow calculation, and I have to ALTER the start time as well:)

Answers (0)