x

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, 2010 at 02:12 PM in Default

avatar 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, 2010 at 02:35 PM

avatar image

Grant Fritchey ♦♦
137k 20 43 81

Great thanks a lot

Apr 16, 2010 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, 2010 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, 2010 at 02:36 PM

avatar image

sp_lock
10.5k 27 37 37

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

Apr 16, 2010 at 06:47 PM Matt Whitfield ♦♦

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

Apr 18, 2010 at 11:46 AM Fatherjack ♦♦

Ha.. Thanks guys ;-)

Apr 18, 2010 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

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x994
x131
x95

asked: Apr 16, 2010 at 02:12 PM

Seen: 1398 times

Last Updated: Apr 16, 2010 at 06:54 PM

Copyright 2016 Redgate Software. Privacy Policy