Page 1 of 1

Question

Posted: 06 Nov 2007, 01:06
by mistermind
Hey there guys
My question is pretty simple actually :)
Is it possible on SFS Basic to schedule an automated Zone Message lets say every day at xx:xx?
I never really got a hold of SFS Pro, but I'm pretty sure its possible on it. Just don't know about SFS Basic.
If not, my plan to "bypass" this would probably be setting up an internal client clock that synchronizes with the server time every time an user logs in, then at the right time it would send the message, but that would require me to update the client engine and would most likely desynchronize in some clients, so a global zone msg would be very handy :)
The reason I want this is because I'm intending to schedule a daily server boot for backups and auto-repairs, since the server is not being able to handle the massive data in MySQL =P

Posted: 06 Nov 2007, 08:33
by poppop
Hi mistermind,

I'm not sure about basic, but in pro -- it's REALLY easy.

You would simply make a timer, when your custom extension loads, you would have this:

Code: Select all

var simpleTest = setInterval(displayMessage, 1440000);
// Every 24hrs

function displayMessage(){

// Do whatever
}


hopefully this gives you an idea. :?:

There is a clearer example in the docs here:

http://www.smartfoxserver.com/docs/docP ... terval.htm


Cheers