Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 300
  • Last Modified:

Windows 2000 Server shutdown remote sql server hangs scheduling job and sql srver doesn't reboot

I have a script, which works perfectly when run from a DOS prompt. It reboots a Windows 2000 SQL server, and then reboots the host system, also a Windows 2000 server. The command to shutdown the remote server uses shutdown.exe with options \\servername /T:30 /R /C. This script is scheduled to run every Sunday at 10:00. I do not have the option of using freeware or public domain software.  

When this script runs as a scheduled task, it hangs forever whilst performing the remote shutdown command. The scheduled task status is executing.
The account the job runs from is the same account I can use successfully from the dos command window.

What can be the problem? Remote access privilege? Which one?
0
peterkulisic
Asked:
peterkulisic
1 Solution
 
rindiCommented:
Try

shutdown \\servername -t:30 -r -c "comment" -f

the -f could be usefull as it is possible that some apps need to be confirmed to shutdown. I think it is also necessary for a comment to be added.
0
 
peterkulisicAuthor Commented:
The /f option seems to be an undocumented feature of the Windows 2000 shutdown.exe.
This certainly seems to be helping, and the server has been rebooted daily without fail for 2 weeks now.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now