Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have done a lot with sql and jobs, and this is throwing me off.

My job is scheduled as shown below.

I can run the job interactively from SSMS by starting the job, it runs, all is well.

It is currently Jan 27 at 11 AM local time. But sp_help_jobactivity returns a next_scheduled_run_date of

next_scheduled_run_date 2012-01-27 12:01:00.000

I expect it to be four hours from the last time I ran it, or from when I created the job and schedule (which I created at the same time).

Observed Problem: While the SSMS GUI displays "12:01 AM" the data in next run shows "12:01:00" which is "12:01 PM"

What am I missing? When will the job next run?

Thanks!

enter image description here

share|improve this question
1  
Uhh... the GUI is showing you the start / end times (in case you need / want to only allow a job to run during certain times). The next run time was correct (12:01 PM) considering that the job would run @ 12:01A, 4:01A, 8:01A, 12:01P, 4:01P, 8:01P each day and it's currently 11A. –  Brandon Jan 28 '12 at 0:07

2 Answers 2

The job runs every 4 hours starting with the start time in the schedule. If you run it manually that has no effect on the next scheduled startstart time.

share|improve this answer

OK, the above comments are the story. Basically, the GUI is not very clear.

As stated, when you set a job to run every 4 hrs, with a start time of 12:01 AM, then SQL works out the sequence of 00:01, 4:01, 8:01, 12:01 PM, and so you see the 12:01 PM.

There does not seem to be a way to say "every four hours, starting now and every four hours thereafter"

The issue could be solved with a GUI improvement so that the GUI simply spells out what is going to happen.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.