Removes a schedule from a job.
sp_delete_jobschedule [@job_id =] job_id, | [@job_name =] 'job_name',
[@name =] 'sched_job_name'
Note Either job_id or job_name must be specified, but both cannot be specified.
0 (success) or 1 (failure)
None
Removing a schedule from a job prevents SQL Server Agent from executing the job according to that schedule. sp_update_jobschedule can be used to disable a scheduled job without removing it from the schedule.
SQL Server Enterprise Manager provides an easy, graphical way to manage jobs, and is the recommended way to create and manage the job infrastructure.
Execute permissions default to the public role.
This example removes the Nightly Backup schedule from the Database Backup job.
USE msdb
EXEC sp_delete_jobschedule @job_name = N'Database Backup',
@name = N'Nightly Backup'
Modifying and Viewing Jobs | sp_update_jobschedule |
sp_add_jobschedule | System Stored Procedures |
sp_help_jobschedule |