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 know there is SELECT * FROM msdb..sysjobschedules, but that just shows the next time a job is scheduled to run.

I want to know how this is all determined and stored. So where does it store the value for Recurs every Monday check box?

share|improve this question

migrated from stackoverflow.com Jul 17 '12 at 14:05

This question came from our site for professional and enthusiast programmers.

    
check out select * from msdb.dbo.sysschedules the system stored procedure sp_add_schedule updates or inserts into this table. –  stb Jul 17 '12 at 14:03
    
I think that information is stored in msdb.dbo.sysschedules. Check out the msdn page. –  Josien Jul 17 '12 at 14:04
    
Thanks for the quick answers. –  joe Jul 18 '12 at 16:53
add comment

2 Answers

up vote 7 down vote accepted

Every 20 minutes (this seems to NOT be configurable), the 'next run' information in sysjobschedules is updated by looking at the information you can see in sysschedules.

You know how when you define a job you have to go through a slightly convoluted process of rather than just saying 'run this job every monday', instead defining a schedule that says that, and associating the job with the schedule? This is why - they have independent existences.

share|improve this answer
    
Thanks for the answer and how often it updates. –  joe Jul 18 '12 at 16:54
add comment

And if you want to link the info in sysschedules to your job info:

use msdb;

select SYSJ.name, SYSS.* from sysjobs as SYSJ
inner join sysjobschedules as SYSJS on SYSJ.job_id = SYSJS.job_id
inner join sysschedules SYSS on SYSS.schedule_id = SYSJS.schedule_id;
share|improve this answer
add comment

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.