Home > Archive > Microsoft SQL Server forum > June 2005 > Disabling jobs due to shutdown?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Disabling jobs due to shutdown?
M Bourgon

2005-06-27, 9:23 am

We have jobs running on our SQL Server 2k that are scheduled to run
every minute. Since it's not the only app on the server (I know, I
know), when it needs to be shut down by Operations, I need to be
notified so that I can stop the jobs first.

What I'd like to do is set up some sort of process so that when they
shut down the server, it automatically disables the job, waits for it
to finish, then allows the shutdown to continue. The only way I can
think of offhand is to create a job they would run - this would disable
the job, poll for the job status, then when complete execute a shutdown
command via xp_cmdshell. I'd create another job that would, on
startup, enable the job.

Any suggestions?

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com