Removes a schedule from a job.
sp_delete_jobschedule [ @job_id = ] job_id , | [ @job_name = ] 'job_name' ,
[ @name = ] 'sched_job_name'
[@job_id =] job_id
Is the identification number of the job from which to delete the schedule. job_id is uniqueidentifier, with a default of NULL.
[@job_name =] 'job_name'
Is the name of the job from which to delete the schedule. job_name is sysname, with a default of NULL.
Note Either job_id or job_name must be specified; both cannot be specified.
[@name =] 'sched_job_name'
Is the name of the schedule to delete. sched_job_name is sysname, with no default.
Return Code Values
0 (success) or 1 (failure)
Removing a schedule from a job prevents Microsoft® SQLServerAgent 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'