Raised This Month: $51 Target: $400
 12% 

Daily Restart


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
sikkepitje
Member
Join Date: May 2004
Location: Netherlands, (EU)
Old 02-26-2006 , 17:05   Re: Daily Restart
Reply With Quote #12

Quote:
Originally Posted by watch

If anyone can think of a better way they hooking it off changelevel im all ears. Doing it when the plugin is initialised wouldn't work unless tasks were used and theres always the possiblity that people get redirected to a http download if they don't have the map. Also with disconnect i thought would be poor as everyone disconnects when the server changes level, not really ideal. I might be being stupid and missed another method thats blatently obvious though I considered using a task but it seemed a bit silly just for this
Good job mate!

Actually I have made a plugin like that, that restarts my server at 4:44 at a daily basis (I can't seem to find it however I posted it here on the forum... ). I don't need to check the number of player because at 4:44 my server is always empty

Why not just create a task for checking every minute? That is not silly. Running the taskcode is infinite small time compared to the total server running time. Especially if the work done in the task is not so complex, like checking if the total player number == 0 then do a restart ... You could set a task every minute or 5 minutes just to do that without a noticable performance penalty.

You could make it so that it sets a task every hour, except between 0:00 and 6:00 (24-hour) it checks every 5 minutes . You don't have to hook any other routine.
__________________
greetz ,
Sikkepitje
sikkepitje is offline
Send a message via MSN to sikkepitje
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:24.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode