prevost999
Programmer
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.
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.