View previous topic :: View next topic |
Author |
Message |
Troy47
Joined: 19 Apr 2010 Posts: 2
|
Posted: Thu Dec 02, 2010 20:22 Post subject: Timed Restarts/Resets of Server Using NWNX? |
|
|
Hey all,
So I've looked through the various documentation and I can't find any settings that allow for an automatic timed restart of the server (not the machine, just the nwnx and nwnserver) X times per day, or every X hours.
I'm looking to setup our server to automatically restart every 6 or so hours. I've found we've had recurring login and 'server vault' error issues for players, and resetting the server always alleviates these problems. So a timed regular reset should help minimize this problem while we hunt for the true cause to this problem.
So can anyone point me to directions how to set a nwn2 server up so as to automatically restart after a defined time period? Is this handled in the base nwnx command line parameters? Do I need a nwnx plugin? Do I need a non-nwnx solution?
If any pw admins out there know the 'best practice' for doing this sort of thing, I'd really appreciate the help.
Thanks
Troy |
|
Back to top |
|
|
drake127
Joined: 26 Jan 2010 Posts: 28
|
Posted: Thu Dec 02, 2010 20:38 Post subject: |
|
|
I use cron.
Here's my crontab (you need to write your own, just example):
0 4 * * * root /etc/init.d/nwserver command say Restart in 30 minutes
20 4 * * * root /etc/init.d/nwserver command say Restart in 10 minutes
25 4 * * * root /etc/init.d/nwserver command say Restart in 5 minutes
29 4 * * * root /etc/init.d/nwserver command say Restart in 1 minute
30 4 * * * root /etc/init.d/nwserver restart
35 4 * * * root /etc/init.d/nwserver command playerpassword #(5 min grace time) |
|
Back to top |
|
|
Skywing
Joined: 03 Jan 2008 Posts: 321
|
Posted: Thu Dec 30, 2010 1:31 Post subject: |
|
|
xp_srvadmin also has a server shutdown function made available to script (you can find it under the development forum). You could use that to shut down the server on script control (NWNX4 will then autorestart it by default). |
|
Back to top |
|
|
|