Discussion Locked

Run a Scheduled Batch File

0 helpful
8 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

This is probably very simple. But for the life of me, I am unable to find the solution. I have been doing some research on the net and come up empty. Here is my problem.
I have a batch file which will execute normally when run manually. However, I need to run this batch file when scheduled. I have several scheduled tasks which are executing normally. They are doing a simple xcopy of files from one location to another. The problem is that the one batch file is calling an exe (executable) file. What I want to do is to do a scheduled re-boot of the Windows 2000 server. The batch file will work manually, but not when scheduled. The current file is a one liner.

cmd.exe /k "C:\reboot.exe"

Any help would be appreciated. Thanks.

Michael R.

8 replies

by rabbit_runner

Poster rated this answer.
I have tried all of the suggestions listed. For some reason, none of them work. Further investigation is needed.

by rabbit_runner

From your answer I assume that there is a file, "shutdown.exe". If this is correct, then what is the full syntax of the command? Thanks

Michael R.

by abarnes70

Michael

SHUTDOWN.EXE is included in the Windows NT and 2000 Resource Kits. The syntax is

/? displays help
\\computer specifies a remote computer
/A aborts a shutdown, which is only allowable during the shutdown countdown
/L specifies the local computer
/R restart the computer after the shutdown
/T:xx sets the countdown in seconds, 30 is default
/C forces any running apps to close, without any prompts to save files
"msg" you can enter a message to be displayed on screen during the countdown

Hope that helps.

by rabbit_runner

Poster rated this answer.
I have tried all of the suggestions listed. For some reason, none of them work. Further investigation is needed.

by gigelul

Hi,
I am using "shutdown.exe" but if you like "reboot.exe" try this:

@START "" "c:\reboot.exe"

by rabbit_runner

Poster rated this answer.
I have tried all of the suggestions listed. For some reason, none of them work. Further investigation is needed.

This discussion is closed to new replies.