Don't see job schedule added by sp_add_jobschedule in SQL Mgmt UI

Posted by Ariel on Server Fault See other posts from Server Fault or by Ariel
Published on 2010-04-30T22:31:29Z Indexed on 2010/04/30 22:48 UTC
Read the original article Hit count: 488

I'm running a script like below on a SQL Server box and, even though it finishes correctly, then when, on SQL Mgmt UI, I right click on that job's properties, go to Schedules, I cannot see the schedule just added... what am I missing? (I'm using the right job_name param, etc) thanks!

BEGIN TRY 
BEGIN TRAN 
  EXEC msdb.dbo.sp_add_jobschedule
  @job_name = 'Job name',
  @name=N'Job schedule name',
  @enabled = 0,
  @freq_type=1,  
  @active_start_date=20100525,  
  @active_start_time=60000 
COMMIT TRAN 
END TRY 
BEGIN CATCH 
    SELECT ERROR_Message(), ERROR_Line(); 
    ROLLBACK TRAN 
END CATCH

© Server Fault or respective owner

Related posts about sql

Related posts about sql-server