script job scheduless

  • I would transfer jobs from one server to another server.

    I can script out using SSMS for all the jobs using object detail view.

    But I found there are no schedules carried over.

    So I guess the schedule cannot be scripted out.

    Is that true

    Thanks

  • No, the schedule can be scripted out. Why not?

    Igor Micev,My blog: www.igormicev.com

  • sqlfriends (11/8/2016)


    I would transfer jobs from one server to another server.

    I can script out using SSMS for all the jobs using object detail view.

    But I found there are no schedules carried over.

    So I guess the schedule cannot be scripted out.

    Is that true

    Thanks

    No, that's not true. The schedules are included in the script. You'll find it near the bottom of the script, starting with

    EXEC @ReturnCode = msdb.dbo.sp_add_jobschedule @job_id=@jobId, ...

    Have you checked the job actually has a schedule attached?

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • Sorry, I saw in job activity monitor and see next run not scheduled. what I should look is the Scheduled column.

    For next run we temporarily disabled it for the period of migration.

    So you are correct, it does script the schedule too

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply