Next_Run_Date/Next_Run_Time

  • I am attempting to write a SQL script that will utilize the two columns mentioned in the subject title that are located in the sysjobschedules table.

    It appears that in some circumstances, these columns are not properly populated, or at least in my somewhat limited mind, they are not populated properly. 

    Does anyone know what triggers the population of these columns, or if they can be relied upon to contain accurate information?  If not, how should one go about acquiring this information?

     

    Thanks for your help.

     

     

  • What table are you querying ...

  • Are you checking to see if the job is enabled? If it's not enabled, it won't know the next run date/time. Also, the first time it's scheduled, the next run date/time will be unknown.

    -SQLBill

  • The job and schedule are both enabled.

    the table is :  sysjobschedules

     

  • I am having the same problem in Sql 2005 Enterprise RTM.

    Whenever I make a change to my schedule (enable or disable schedule, change frequency, time etc), the next run date and next run time (in sysjobschedules) does not get updated. Because of this, my job does not run every time I make a change to my schedule.

    I am not sure, when SQL Server 2005 updates the job schedule. Can anyone throw some light on this. Is this a bug? What is the fix?

     

    Give me a fish, you feed me for a day! Teach me to fish, you feed me for a life time.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply