1. Basically I just want my server to auto-restart every X hours and display messages in the chat such as: Server restarting in X minutes or X hours. I don't know if there are any plugins to do so though and was wondering how I could achieve this. Any help is appreciated.
     
  2. I saw that plugin but I don't understand how it works because Wulf said a plugin can't restart a server, but a script can.
     
  3. mmmm? afaik this plugin works to restart a server, I have used it before and it seems to restart properly
     
  4. So basically I can make it restart at for example 12 AM every morning and 12 PM every night or something like that? Also, is there any way for it to install the newest server and Oxide builds on every Thursday for me?
     
  5. read the overview page for the plugin ;) it will tell you everything you need to know
     
  6. I suggest Timed Execute | Oxide as it works flawlessly with restarting both my servers.

    Does it twice a day without fail.
     
  7. Ok but if I were to use TimedExecute how would I make it say in chat that the server is restarting in X minutes then have it Actually restart?

    I tried using the restarter.exe with timedexecute but I don't understand how to set it up.
     
    Last edited by a moderator: Jul 30, 2017
  8. Code:
    {
      "EnableInGameTime-Timer": false,
      "EnableRealTime-Timer": true,
      "EnableTimerOnce": false,
      "EnableTimerRepeat": false,
      "InGameTime-Timer": {},
      "RealTime-Timer": {
        "11:59:00": "restart 60",
        "23:59:00": "restart 60"
      },
      "TimerOnce": {},
      "TimerRepeat": {}
    }
    this will restart your server twice a day 12am and 12pm with timedExecute
     
  9. Do I also need the restarter.exe still with this? Also, where would I put that code would I replace the default code there already?
     
  10. Wulf

    Wulf Community Admin

    A plugin can't start the server. All that restarting does with Rust is shutdown the server, there is nothing internally that can actually start it again. To actually start the server again, you'd need that functionality in a script or provided by your host if you aren't self-hosting.

    If you are self-hosting, there is an example script included with Oxide that would handle a restart after it was shutdown via commands or crash.
     
  11. For my server I took the example batch file that came with oxide, changed the title, and edited the internals. Now that I have that plugin installed, does that mean that the command at the end of the batch will restart the second it quits through the plugin? Also, the only thing that I see that involves the server restarting is the part at the beginning where it says @echo off and at the end where is says restarting server.
     
  12. Wulf

    Wulf Community Admin

    The "goto start" is what handles the restart. So once your server is told to shutdown through either "shutdown" or "restart" commands, it will be started again because it's in a loop in that script.
     
  13. Ok great thanks but just one more question. I tried to customize the script a little bit by adding server text when the server is going to restart but it throws an error at me upon boot up of the server about ':' being an invalid character but I don't know what to change.

    Code:
            {
                "EnableInGameTime-Timer": false,
                "EnableRealTime-Timer": true,
                "EnableTimerOnce": false,
                "EnableTimerRepeat": false,
                "InGameTime-Timer": {},
                "RealTime-Timer": {
                    "11:29:00": "say 'Server will restart in 30 minutes.'",
                    "08:20:00": "say 'Server will restart in 15 minutes.'",
                    "08:30:00": "say 'Server will restart in 5 minutes.'",
                    "08:34:00": "say 'Server will restart in 1 minute.'",
                    "08:35:55": "say 'Server is now restarting. Please wait.'",
                    "08:36:00": "restart 60",
                    "23:29:00": "say 'Server will restart in 30 minutes.'",
                    "23:44:00": "say 'Server will restart in 15 minutes.'",
                    "23:54:00": "say 'Server will restart in 5 minutes.'",
                    "23:58:00": "say 'Server will restart in 1 minute.'",
                    "23:58:55": "say 'Server is now restarting. Please wait.'",
                    "23:59:00": "restart 60"
                },
                    "TimerOnce": {},
                    "TimerRepeat": {}
            }
     
  14. Bump. This isn't really solved it still doesn't work can anyone answer my last question?
     
  15. Wulf

    Wulf Community Admin

    If you're having trouble with a particular plugin, I'd suggest asking in its support thread. Also, when editing .json files, make sure it is valid JSON. You can validate your config file to see if it is valid JSON by using a site such as www.jsonlint.com.