Jump to content

Server Restart Real Time


diego00

Recommended Posts

Good!


Could anyone share one script to exec the console command:

quit();

At specifics real server's time, please?


Like as I have one config:


restarts = { "04:00", "08:00", "14:00", "20:00" }


So the script will send the quit(); cmd to console at 4 o'clock, 8 o'clock 14 o'clock and 20 o'clock.


Thank you!!!

Link to comment
Share on other sites

What you plan to do? You can make a script that quits the game from the operating system and restarts it if you need.From within the game I don't know how to get the real time, but I would simply start a timer and then send quit command so it will fit the clocks time. For example if you start the game at 4 and make a schedule for 4 hours and then send quit it will obviously quit at 8 and so on, I'm more a workaround kind of guy, so no idea if that is good enough for you, but I think it should do the job.


Personally I use a command to restart my game servers after a certain time, since if they run nonstop for days some errors may happen.

Link to comment
Share on other sites

What you plan to do? You can make a script that quits the game from the operating system and restarts it if you need.From within the game I don't know how to get the real time, but I would simply start a timer and then send quit command so it will fit the clocks time. For example if you start the game at 4 and make a schedule for 4 hours and then send quit it will obviously quit at 8 and so on, I'm more a workaround kind of guy, so no idea if that is good enough for you, but I think it should do the job.


Personally I use a command to restart my game servers after a certain time, since if they run nonstop for days some errors may happen.

 

I've think on those too, but it isn't good. I'm hosting one game made with Torque 3D engine. The server has the command: quit();

I want to send this command: quit(); to server's console to quit the server.

The reason is because quit(); saves the game before closes the server.

I can force a kill process on windows, but it would not save the game before killing the process as quit() does. So i really need uses quit(); command, not force killing process on windows =(


The timer don't fit my needs too. I want to server restarts at specifics real time. Don't matter if it restarted 1 hour before or 1 minute. If it's 8 o'clock i want server restart.

The reason is because the game have some tasks that needs time to be completed, more than 1 or 2 hours. With specifics times configured, the players can planning and don't loose time doing something that can't be finished before restarts...


Another reason is that i've a windows process check if game crashed. If so, the server is launched again.

It will breaks up all my server restarts after get some crash for example with timers.


Can i use C++ or 3rd party library instead torque 3d scripts to do the restart at real times, please?


This is the only way it would work.


Thank you!!!

Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...