Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 sp_help_jobschedule caches data?

Author  Topic 

pjn
Starting Member

27 Posts

Posted - 2004-06-30 : 04:45:03
Hi

One of our clients is using MSDE so I've knocked up a quick application that uses sp_help_jobhistory and sp_help_jobschedule to show the results of a certain job, and when it is scheduled to run again.

I'm finding that sp_help_jobschedule isn't returning the correct value in the 'next_run_time' column. For example, the job is scheduled for every 10 minutes. If it runs at 09:30, the SP still shows next_run_time=09:30 even when the time is 09:45. Eventually it displays the correct time (maybe 20-odd minutes later)

This happens both when calling the SP from my app, and QA.

However, checking the Next Run Time in Enterprise Manager always shows the correct information - any ideas how I can get the SP to return the correct info? I was going to query sysjobschedules directly - but this also shows the time as 09:30 !

Thanks
Pete

mohdowais
Sheikh of Yak Knowledge

1456 Posts

Posted - 2004-06-30 : 05:11:22
have you checked the time on the server? it's possible that the clock on the server is a few minutes behind.

OS
Go to Top of Page

pjn
Starting Member

27 Posts

Posted - 2004-06-30 : 05:24:07
I've checked the time on the server and it matches my PC (everything gets synched on our network)

The thing is, the job is definitely running at the set time (I watch it in EM) and EM updates the next run time correctly - yet the data in sysjobschedules isn't getting updated straight away.
Go to Top of Page
   

- Advertisement -