COD4 Nightly Server Restart - VDS

Ask questions about dedicated servers here and we and other users will do our best to answer them. Please also refer to the self-help section for tutorials and answers to the most commonly asked questions.
Post Reply
defiant
New to forums
New to forums
Posts: 3
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Thu Mar 18, 2010 3:34 pm

COD4 Nightly Server Restart - VDS

Post by defiant »

Very new to the VDS/VPS scene. I am wondering how to go about scheduling a task to shut down and restart the cod4 game instances at a specified time.

Thanks
User avatar
Edge100x
Founder
Founder
Posts: 13126
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: COD4 Nightly Server Restart - VDS

Post by Edge100x »

You should be able to do this with a "Scheduled Task" in Windows. Depending on how you set things up, you would need to create a batch file that either kills the process, or that stops and starts the service.

For instance, you might make a restart.bat file that contains these lines, to stop and start a service called "myserver":

Code: Select all

net stop myserver
net start myserver
Or you might use one like this to kill the process. You'd also need to have the server running in a wrapper that causes it to restart again after this:

Code: Select all

taskkill /im iw3mp.exe
defiant
New to forums
New to forums
Posts: 3
Joined: Thu Mar 18, 2010 3:34 pm

Re: COD4 Nightly Server Restart - VDS

Post by defiant »

So, this has been working great until I attempted to start more than 2 server instances in the batch file. If the batch file starts more than 2 server instances, only the first 2 are started. This is what my batch file looks like

Code: Select all

start server1.lnk
start server2.lnk
start server3.lnk
Any reason you can think of as to why it only starts the first 2 lines?
User avatar
Edge100x
Founder
Founder
Posts: 13126
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: COD4 Nightly Server Restart - VDS

Post by Edge100x »

That's very odd. Have you tried putting the command lines directly into the batch file instead of in shortcut files?
Post Reply