Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
share|improve this question
add comment

1 Answer

Syntax looks fine, I tried it on a test server and it worked; there were some bugs in the agent jobs handling in SSMS, make sure your client tools are service packed up to the latest. Try scripting the job out in SSMS and see if the schedule shows up in the script.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.