logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Timed Restarts/Resets of Server Using NWNX?

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Technical support
View previous topic :: View next topic  
Author Message
Troy47



Joined: 19 Apr 2010
Posts: 2

PostPosted: Thu Dec 02, 2010 20:22    Post subject: Timed Restarts/Resets of Server Using NWNX? Reply with quote

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
View user's profile Send private message
drake127



Joined: 26 Jan 2010
Posts: 28

PostPosted: Thu Dec 02, 2010 20:38    Post subject: Reply with quote

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
View user's profile Send private message
Skywing



Joined: 03 Jan 2008
Posts: 321

PostPosted: Thu Dec 30, 2010 1:31    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Technical support All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group