sysschedules (Transact-SQL)
Contains information about SQL Server Agent job schedules. This table is stored in the msdb database.
Column name
Data type
Description
schedule_id
int
ID of the SQL Server Agent job schedule.
schedule_uid
uniqueidentifier
Unique identifier of the job schedule. This value is used to identify a schedule for distributed jobs.
originating_server_id
int
ID of the master server from which the job schedule came.
name
sysname (nvarchar(128))
User-defined name for the job schedule. This name must be unique within a job.
owner_sid
varbinary(85)
Microsoft Windows security_identifier of the user or group that owns the job schedule.
enabled
int
Status of the job schedule:
0 = Not enabled.
1 = Enabled.
If the schedule is not enabled, no jobs will run on the schedule.
freq_type
int
How frequently a job runs for this schedule.
1 = One time only
4 = Daily
8 = Weekly
16 = Monthly
32 = Monthly, relative to freq_interval
64 = Runs when the SQL Server Agent service starts
128 = Runs when the computer is idle
freq_interval
int
Days that the job is executed. Depends on the value of freq_type. The default value is 0, which indicates that freq_interval is unused.
Value of freq_type
Effect on freq_interval
1 (once)freq_interval is unused (0)
4 (daily)Every freq_interval days
8 (weekly)freq_interval is one or more of the following: 1 = Sunday 2 = Monday 4 = Tuesday 8 = Wednesday 16 = Thursday 32 = Friday 64 = Saturday
16 (monthly)On the freq_interval day of the month
32 (monthly, relative)freq_interval is one of the following: 1 = Sunday 2 = Monday 3 = Tuesday 4 = Wednesday 5 = Thursday 6 = Friday 7 = Saturday 8 = Day 9 = Weekday 10 = Weekend day
64 (starts when SQL Server Agent service starts)freq_interval is unused (0)
128 (runs when computer is idle)freq_interval is unused (0)
freq_subday_type
int
Units for the freq_subday_interval. Can be one of the following values:
Value
Description (unit)
1At the specified time
2Seconds
4Minutes
8Hours
freq_subday_interval
int
Number of freq_subday_type periods to occur between each execution of the job.
freq_relative_interval
int
When freq_interval occurs in each month, if freq_interval is 32 (monthly relative). Can be one of the following values:
0 = freq_relative_interval is unused
1 = First
2 = Second
4 = Third
8 = Fourth
16 = Last
freq_recurrence_
factor
int
Number of weeks or months between the scheduled execution of a job. freq_recurrence_factor is used only if freq_type is 8, 16, or 32. If this column contains 0, freq_recurrence_factor is unused.
active_start_date
int
Date on which execution of a job can begin. The date is formatted as YYYYMMDD. NULL indicates today's date.
active_end_date
int
Date on which execution of a job can stop. The date is formatted YYYYMMDD.
active_start_time
int
Time on any day between active_start_date and active_end_date that job begins executing. Time is formatted HHMMSS, using a 24-hour clock.
active_end_time
int
Time on any day between active_start_date and active_end_date that job stops executing. Time is formatted HHMMSS, using a 24-hour clock.
date_created
datetime
Date and time that the schedule was created.
date_modified
datetime
Date and time that the schedule was last modified.
version_number
int
Current version number of the schedule. For example, if a schedule has been modified 10 times, the version_number is 10.
See Also
Reference
sysjobschedules (Transact-SQL)