Why might Sql Server Agent's Next Run Time value not be what I expect? And is this definitely the next time my job will run?

When did you check this data? The msdb.dbo.sysjobschedules table refreshes every 20 minutes. So if you had it set and then changed it, then ran the sp_help_jobschedule stored procedure, the underlying data might not be updated yet.

What do you get for next_scheduled_run_date when you execute this query?

exec sp_help_jobactivity @job_name = 'YourJobScheduleName'

Based on the Active Start Date Mar 16th 2011, in January 2012, we would expect a schedule occurrence to land on Wed Jan 18th.

If the modified date of that schedule becomes greater than the active start date, SQL than seems to use the modified date as the starting point from which to determine the next Wednesday to start the 4 week sequence.

If an update is happening on Tues Jan 10th, then the next run date becomes Wed Jan 11th and every subsequent Wednesday 4 weeks from there is now relative to Jan 11th which now omits Jan 18th from the original sequence.

The active start date seems to no longer have relevance to SQL server when calculating the next run date.

It will simply pick the next day in the future, starting from the modified date, that matches the requested weekday; in this case the next Wednesday.


This query can be useful, for history details you can join msdb.dbo.sysjobhistory

SELECT   job.name AS JobName,  
    job.description AS [Description],  
    job.enabled AS IsEnabled,  
    max(act.start_execution_date) AS StartExecutionDate,  
    max(act.next_scheduled_run_date) AS NextScheduledRunDate  
FROM     msdb.dbo.sysjobs AS job  
    LEFT OUTER JOIN  
    [msdb].[dbo].[sysjobactivity] AS act  
    ON act.job_id = job.job_id  
GROUP BY job.name, job.description, job.enabled;