When a SQL Agent schedule is created using sp_add_schedule there is an option to specify the parameter active_start_date that is the date that job execution will begin. For more information, see the section "Scheduling Start Date" in Create and Attach Schedules to Jobs.įor weekly or monthly schedules, the Agent ignores if active_start_date is in the past, and instead uses the current date. If active_start_date is not NULL, the date must be greater than or equal to 19900101.Īfter the schedule is created, review the start date and confirm that it is the correct date. active_start_date is int, with a default of NULL, which indicates today's date. The date on which execution of a job can begin. freq_recurrence_factor is int, with a default of 0. freq_recurrence_factor is used only if freq_type is 8, 16, or 32. The number of weeks or months between the scheduled execution of a job. freq_relative_interval is ignored in those cases where freq_type is not equal to 32. freq_relative_interval is int, with a default of 0, and can be one of these values. freq_subday_interval is ignored in those cases where freq_subday_type is equal to 1.Ī job's occurrence of freq_interval in each month, if freq_interval is 32 (monthly relative). Note: Interval should be longer than 10 seconds.
freq_subday_interval is int, with a default of 0. The number of freq_subday_type periods to occur between each execution of a job. freq_subday_type is int, with a default of 0, and can be one of these values. Specifies the units for freq_subday_interval. Value of freq_typeįreq_interval is one or more of the following (combined with an OR logical operator): freq_interval is int, with a default of 1, and depends on the value of freq_type.
Run when the computer is idle (not supported in Azure SQL Managed Instance) freq_type is int, with a default of 0, and can be one of these values. When the schedule is not enabled, no jobs will run on this schedule.Ī value indicating when a job is to be executed. enabled is tinyint, with a default of 1 (enabled). Indicates the current status of the schedule. schedule_name is sysname, with no default. Applies to: SQL Server (all supported versions) Azure SQL Managed InstanceĬreates a schedule that can be used by any number of jobs.