x
login about faq Site discussion (meta-askssc)

SQl server Agent

Hi, I have a SQL server job with 3 schedules, how I can configure the job to ignore schedule 2 and 3 if schedule 1 was successful, schedules kicks off 8,9,10 AM, the job runs on a monthly basis.

more ▼

asked Apr 16 '10 at 02:12 PM in Default

user-1550 (google) gravatar image

user-1550 (google)
11 2 2 3

(comments are locked)
10|1200 characters needed characters left

2 answers: sort voted first

Well, one option that you could try is to set up two steps in the job. The first step would, on success, call the second step, which made calls to sp_update_schedule and disabled those two schedules for that job. Or, reverse it, and have the jobs disabled by default, but if the first step errors, the second step enables the two schedules using the same proc.

more ▼

answered Apr 16 '10 at 02:35 PM

Grant Fritchey gravatar image

Grant Fritchey ♦♦
62.6k 12 20 66

Great thanks a lot

Apr 16 '10 at 03:51 PM user-1550 (google)

most efficient method to perform the task. There are other methods that may be employed, but this is what I would use.

Apr 16 '10 at 08:48 PM CirqueDeSQLeil
(comments are locked)
10|1200 characters needed characters left

DOh... Pip'd at the finish line !!!

more ▼

answered Apr 16 '10 at 02:36 PM

sp_lock gravatar image

sp_lock
8.1k 20 26 29

I +1d Grant but I thought I'd +1 you too in sympathy! :)

Apr 16 '10 at 06:47 PM Matt Whitfield ♦♦

yeah, you get a +1 in sympathy from me too ;)

Apr 18 '10 at 11:46 AM Fatherjack ♦♦

Ha.. Thanks guys ;-)

Apr 18 '10 at 01:16 PM sp_lock
(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments



Facebook logo Follow Ask SSC on Facebook
Find Ask SSC on Google+
linkedin logo Find us on LinkedIn

Topics:

x600
x119
x95

asked: Apr 16 '10 at 02:12 PM

Seen: 705 times

Last Updated: Apr 16 '10 at 06:54 PM

Copyright © 2002-2012 Simple Talk Publishing. All Rights Reserved. If you have any queries, please contact the site administrators.
Ask SQL Server Central is a community service provided by Red Gate.