sysjobschedules

Transact-SQL Reference

Transact-SQL Reference

sysjobschedules

Contains schedule information for jobs to be executed by SQL Server Agent. This table is stored in the msdb database.

Column name Data type Description
schedule_id int ID of the schedule.
job_id uniqueidentifier ID of the job.
name sysname Name of the schedule.
enabled int Enabled status of the schedule.
freq_type int Frequency of the schedule execution:

1 = Once
4 = Daily
8 = Weekly
16 = Monthly
32 = Monthly relative
64 = When SQL Server
Agent starts

freq_interval int Value indicating on which days the schedule runs.

If freq_type is 4 (daily), the value is every freq_interval days.

If freq_type is 8 (weekly), the value is a bitmask indicating the days in which weekly schedules are run. The freq_interval values are:

1 = Sunday
2 = Monday
4 = Tuesday
8 = Wednesday
16 = Thursday
32 = Friday
64 = Saturday

If freq_type is 16 (monthly), the value is freq_interval day of the month.

If freq_type is 32 (monthly relative), freq_interval can be one of these values:

1 = Sunday
2 = Monday
3 = Tuesday
4 = Wednesday
5 = Thursday
6 = Friday
7 = Saturday
8 = Day
9 = Weekday
10 = Weekend day

freq_subday_type int Units for the freq_subday_interval:

1 = At the specified time
2 = Seconds
4 = Minutes
8 = Hours

freq_subday_interval int Number of freq_subday_type periods to occur between each scheduled execution of the job.
freq_relative_
interval
int Scheduled job's occurrence of the freq_interval in each month when freq_type is 32 (monthly relative):
1 = First
2 = Second
4 = Third
8 = Fourth
16 = Last
freq_recurrence_
factor
int Number of weeks or months between the scheduled execution of the job.
active_start_date int Date to begin executing the job.
active_end_date int Date to stop executing the job.
active_start_time int Time to start executing the job.
active_end_time int Time to stop executing the job.
next_run_date int Date that the job will next execute.
next_run_time int Time that the job will next execute.
date_created datetime Date the scheduled job entry was created.