06-01-2008, 06:24 AM
(This post was last modified: 06-10-2008, 08:51 PM by gamegod432.)
In this tutorial you will learn how to schedule your Source Dedicated Server tool to restart at a given time every day [Windows Only]
You will need Watchdog to automatically open srcds.exe, and a small program called Kill and a script called Kill.bat. By running kill.bat, it forces the process srcds.exe to close. When srcds.exe closes, Watchdog will open it again.
1. Download the essential files here:
ServerRestart.zip (Size: 27.17 KB / Downloads: 252)
and extract them to your server directory ex. C:/Srcds
Kill.exe - A process killer, used to close Srcds.exe
Kill.bat - A simple batch file i wrote up to end Srcds.exe
Watchdog.bat - A batch file that restarts Srcds if it closes
Srcdsfpsboost.exe - A non-essential tool that boosts the FPS on your server, i use it, you should too
2. Edit watchdog.bat to match your command line
Right Click on Watchdog.bat and on the 8th line you should see
or something similar.
Edit the code after srcds.exe to match your server's command line.
3. Open the Start Menu and open Control Panel
4. Double-Click on Scheduled Tasks
5. When the Scheduled Tasks window opens, double click on Add Scheduled Task, this will open the Scheduled Task Wizard
6. Click Browse on the wizard and navigate to your server directory and select kill.bat
7. Name the task kill and make sure that Perform This Task is set to Daily and click Next
8. Set the time that you want your server to restart, preferably a time when the server is empty. Again, make sure that Perform This Task is set to 'Every Day'. Also, make sure that Start Date is set to the current date
9. Click Next and input your password in both windows and click Next
10. The wizard will confirm the settings and then press Finish
Usage:
Run Watchdog.bat from your server directory, this will start your server with the command line you set. Also, run srcdsfpsboost.exe to increase server's framerate.
Congratulations! your server will now restart everyday at the time you set
Edit: This will only work on administrator accounts with a password, you cannot schedule tasks with a blank password
You will need Watchdog to automatically open srcds.exe, and a small program called Kill and a script called Kill.bat. By running kill.bat, it forces the process srcds.exe to close. When srcds.exe closes, Watchdog will open it again.
1. Download the essential files here:
ServerRestart.zip (Size: 27.17 KB / Downloads: 252)
and extract them to your server directory ex. C:/Srcds
Kill.exe - A process killer, used to close Srcds.exe
Kill.bat - A simple batch file i wrote up to end Srcds.exe
Watchdog.bat - A batch file that restarts Srcds if it closes
Srcdsfpsboost.exe - A non-essential tool that boosts the FPS on your server, i use it, you should too
2. Edit watchdog.bat to match your command line
Right Click on Watchdog.bat and on the 8th line you should see
Code:
start /wait srcds.exe -game cstrike -console +map de_dust2 -maxplayers 16 -autoupdate +port 27015
Edit the code after srcds.exe to match your server's command line.
3. Open the Start Menu and open Control Panel
4. Double-Click on Scheduled Tasks
5. When the Scheduled Tasks window opens, double click on Add Scheduled Task, this will open the Scheduled Task Wizard
6. Click Browse on the wizard and navigate to your server directory and select kill.bat
7. Name the task kill and make sure that Perform This Task is set to Daily and click Next
8. Set the time that you want your server to restart, preferably a time when the server is empty. Again, make sure that Perform This Task is set to 'Every Day'. Also, make sure that Start Date is set to the current date
9. Click Next and input your password in both windows and click Next
10. The wizard will confirm the settings and then press Finish
Usage:
Run Watchdog.bat from your server directory, this will start your server with the command line you set. Also, run srcdsfpsboost.exe to increase server's framerate.
Congratulations! your server will now restart everyday at the time you set
Edit: This will only work on administrator accounts with a password, you cannot schedule tasks with a blank password