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
COD4 Nightly Server Restart - VDS
-
- New to forums
- Posts: 3
- https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
- Joined: Thu Mar 18, 2010 3:34 pm
Re: COD4 Nightly Server Restart - VDS
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":
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:
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
Code: Select all
taskkill /im iw3mp.exe
Re: COD4 Nightly Server Restart - VDS
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
Any reason you can think of as to why it only starts the first 2 lines?
Code: Select all
start server1.lnk
start server2.lnk
start server3.lnk
Re: COD4 Nightly Server Restart - VDS
That's very odd. Have you tried putting the command lines directly into the batch file instead of in shortcut files?