Job Schedules

  • SQL Server Job.

    I have a task on every Sunday step 1 has to be executed not step 2, and Every first day of the month step 2 has to be executed not step 1

    Solutions I have in mind

    1. Create 2 jobs one runs at schedule 1 and othe on schedule 2.

    2. Create 1 step job and inside step 1 do the tasks  if Day = Sunday task 1 if day is first business day task 2

     

    Really I would like to associate step 1 to schedule 1 and step 2 to schedule 2. Is it possible?

    I have the impression that if we have multiple schedules for the SQL Server JOB (Example Every Sunday and Every first day of the month), the job will run all the steps for both the schedules.

    Regards,
    gova

  • Had a similar situation and went with the same as your option 1... good thing, too.  We replaced the code for job 1 keeping the same schedule, changed the schedule for job 2, and created a new job for the old schedule 2.

    Divide and conquer is the only way to go IMHO.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • So associating different steps to different schedules is not possible.

    How is it SQL Server 2005. I read there schedules are different entities and re-usable.

    Regards,
    gova

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

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