View Single Post
tammar
Junior Member
Join Date: Aug 2004
Old 08-14-2004 , 06:55  
Reply With Quote #31

Quote:
Originally Posted by Morpheus
Hi there!

I want a this to work so the plugin announce something like this:

"Server is restarting ..bla bla bla"

Then it should kill the server, so ex. Linux server is restarting whole server to prevent memory leak !

What should I do?

Cheers

Morpheus
Example: I want to restart the server every day at 03:00 am.

I placed to amxx.cfg following to shutdown the server:

Code:
amx_task 2:55 "amx_csay yellow Server is going down in 5 minutes" tr
amx_task 2:59 "amx_csay yellow Server is going down in 1 minute" tr
amx_task 3:00 "amx_rcon quit" tr
To start it again, there is no other way (I guess) than setting up a cron job. The crontab line to start the server at 3:01 would look like this:

Code:
1 3 * * * <commandline used to start the server>
If server shutdown fails and cron tries to start another server, the new server won't start because it's port will be still in use. So there is no risk of having too many DS only because server shutdown failed.

Hope it helps,

T.
tammar is offline