General discussion

Locked

Run a Scheduled Batch File

By Rabbit_Runner ·
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.

This conversation is currently closed to new comments.

8 total posts (Page 1 of 1)  
Thread display: Collapse - | Expand +

All Comments

Collapse -

by mgonzales In reply to Run a Scheduled Batch Fil ...

We do this with one of our servers weekly

c:\winnt\system32\shutdown /l /r /y /c

Collapse -

by Rabbit_Runner In reply to

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

Collapse -

by Rabbit_Runner In reply to Run a Scheduled Batch Fil ...

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.

Collapse -

by a.barnes In reply to Run a Scheduled Batch Fil ...

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.

Collapse -

by Rabbit_Runner In reply to

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

Collapse -

by Gigelul In reply to Run a Scheduled Batch Fil ...

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

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

Collapse -

by Rabbit_Runner In reply to

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

Collapse -

by Rabbit_Runner In reply to Run a Scheduled Batch Fil ...

This question was closed by the author

Back to Windows Forum
8 total posts (Page 1 of 1)  

Related Discussions

Related Forums