SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Relaunch jobs automatically


Relaunch jobs automatically

Author
Message
eduardo.hernandezmontesinos
eduardo.hernandezmontesinos
SSC Rookie
SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)

Group: General Forum Members
Points: 26 Visits: 8
Good morning,

I manage a SQL Server in which I have scheduled several jobs that are executed automatically according to the established schedule. The problem is that from time to time, due to connectivity problems or other problems of others, some jobs fail, cutting the process in the step that corresponds, so manually, we have to access the work and relaunch it in step in which it was executed with error.

I was looking at the option of creating a programmed job that in some way will monitor the status of other jobs, and if it see any job that has stopped with error, re-launch it automatically. Would it be possible?

Thanks in advance.
HappyGeek
HappyGeek
SSChampion
SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)

Group: General Forum Members
Points: 14460 Visits: 7036

Why not use the retry option for the step if it so rare an occurrence, while you work on why it fails that is?



...
eduardo.hernandezmontesinos
eduardo.hernandezmontesinos
SSC Rookie
SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)

Group: General Forum Members
Points: 26 Visits: 8
Thanks for the reply,

We know the causes for which the works fail randomly, and as I say, it is due to connectivity problems of our SQL servers. In addition, these works are launched at dawn to collect information for a scorecard.
HappyGeek
HappyGeek
SSChampion
SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)

Group: General Forum Members
Points: 14460 Visits: 7036
You will find the retry option under the Advanced tab for the steps(s) that you wish to set the option for along with a retry interval option.

...
Thom A
Thom A
SSC Guru
SSC Guru (80K reputation)SSC Guru (80K reputation)SSC Guru (80K reputation)SSC Guru (80K reputation)SSC Guru (80K reputation)SSC Guru (80K reputation)SSC Guru (80K reputation)SSC Guru (80K reputation)

Group: General Forum Members
Points: 80131 Visits: 20347
I agree that the Retry option seems the right choice here. if the issue is a connection issue, then set the task to retry up to say 2 further times, and set them to something like a 10 minute delay (so that connections can be re-established).


Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does :-P

Please always remember to encapsulate your code in IFCode Markup. For example [code=sql] [/code].
Click here to read Jeffs Guide on how to post SQL questions, and get swift and helpful answers from the community
eduardo.hernandezmontesinos
eduardo.hernandezmontesinos
SSC Rookie
SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)

Group: General Forum Members
Points: 26 Visits: 8
Thank you very much for the solution.

The truth is that I did not see the "retry" option in each of the steps of a scheduled job. So thank you very much for making me visible!

Happy New Year!!!
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum








































































































































































SQLServerCentral


Search