Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Job execution - setting a time limit.

Status
Not open for further replies.

prevost999

Programmer
Jun 28, 2001
38
US
I have a job that runs for about 1.5 hrs and usually completes successfully. Occasionaly, however, it fails, and sometimes, it just hangs and keeps executing endlessly until I stop it manually.

My question is:
Is there any way to set a time limit on how long a job can run, and then it will be automatically killed?

From my research thus far, all I can come up with is to use the sp_stop_job (T-SQL) command in a separate job, and schedule it out about 2 hours ahead of the first job.

Is there an easier way to do this?
Thanks in advance.
 

I'm not aware of any way to set a timeout on a job. sp_stop_job appears to be the way to go. Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top