Run your server in a start.bat like this:
Then use the latest version of TimedExecute with a config like this:Code:@echo off :loop RustDedicated.exe <your params> goto loop
Code:{ "EnabledRealTime-Timer": true, "EnableTimerOnce": false, "EnableTimerRepeat": true, "RealTime-Timer": { "04:50:00": "say The server is restarting in 10 minutes.", "04:59:30": "say The server is restarting now.", "05:00:00": "quit" }, "TimerRepeat": { "server.save": 300 } }
Solved Server info and automatic restarting
Discussion in 'Rust Discussion' started by Das JÄGER, Sep 16, 2015.
-
Here is my config that works. Restarts every 6 hours. For my server Afterlife.
Using Timed Execute :
Code:{ "EnabledRealTime-Timer": true, "EnableTimerOnce": true, "EnableTimerRepeat": true, "RealTime-Timer": { "22:00:00": "say 'Restart in 3 HOURS'", "23:00:00": "say 'Restart in 2 HOURS'", "00:00:00": "say 'Restart in 1 HOUR'", "00:30:00": "say 'Restart in 30 Minutes'", "00:45:00": "say 'Restart in 15 Minutes'", "00:50:00": "say 'Restart in 10 Minutes'", "00:55:00": "say 'Restart in 5 Minutes'", "01:00:00": "say 'The server is restarting NOW.'", "01:00:00": "server.save", "01:00:00": "global.restart", "04:00:00": "say 'Restart in 3 HOURS'", "05:00:00": "say 'Restart in 2 HOURS'", "06:00:00": "say 'Restart in 1 HOUR'", "06:30:00": "say 'Restart in 30 Minutes'", "06:45:00": "say 'Restart in 15 Minutes'", "06:50:00": "say 'Restart in 10 Minutes'", "06:55:00": "say 'Restart in 5 Minutes'", "07:00:00": "say 'The server is restarting NOW.'", "07:00:00": "server.save", "07:00:00": "global.restart", "10:00:00": "say 'Restart in 3 HOURS'", "11:00:00": "say 'Restart in 2 HOURS'", "12:00:00": "say 'Restart in 1 HOUR'", "12:30:00": "say 'Restart in 30 Minutes'", "12:45:00": "say 'Restart in 15 Minutes'", "12:50:00": "say 'Restart in 10 Minutes'", "12:55:00": "say 'Restart in 5 Minutes'", "13:00:00": "say 'The server is restarting NOW.'", "13:00:00": "server.save", "13:00:00": "global.restart", "16:00:00": "say 'Restart in 3 HOURS'", "17:00:00": "say 'Restart in 2 HOURS'", "18:00:00": "say 'Restart in 1 HOUR'", "18:30:00": "say 'Restart in 30 Minutes'", "18:45:00": "say 'Restart in 15 Minutes'", "18:50:00": "say 'Restart in 10 Minutes'", "18:55:00": "say 'Restart in 5 Minutes'", "19:00:00": "say 'The server is restarting NOW.'", "19:00:00": "server.save", "19:00:00": "global.restart", }, "TimerOnce": { }, "TimerRepeat": { "event.run": 300, "server.save": 120, "callheli": 7200 } }
-
Would be better if it said Restarting
-
-
-
Hey Wolf is there a Bat command/file that you have for dedicated server that will auto update Steam and (Oxide) i know how to do the steam one but not update oxide too and was wondering if there was a way to run a bat file to update Oxide?
-
-
@echo off
:loop
RustDedicated.exe <your params>
goto loop
Does this no longer work? I use TimedExcute and the server shuts down but never starts back up . It was working like two weeks ago? -
Wulf Community Admin
If the server isn't starting back up, then something is either keeping it from shutting down or preventing it from starting. -
Yeah it shuts down fine, just wont restart back up. Now type quit in console then it will shut down and restart back up fine .. this is my TimedExcute config.
Code:{ "EnabledRealTime-Timer": true, "EnableTimerOnce": false, "EnableTimerRepeat": true, "RealTime-Timer": { "10:59:00": "say The server is restarting in 1 hour.", "11:50:00": "say The server is restarting in 10 minutes.", "11:59:30": "say The server is restarting now.", "12:00:00": "quit" }, "TimerRepeat": { "server.save": 300 } }
-
Wulf Community Admin
-
Code:
12:21 [Info] Loaded plugin RAD-Line v3.0.1 by SkinN 12:21 [Info] [RAD-Line] Radiation levels are now up for 10 minutes. 12:21 [Error] Failed to initialize plugin 'RadLine v3.0.1' (NullReferenceException: Object reference not set to an instance of an object) 12:21 [Debug] at ConsoleSystem.Broadcast (System.String strCommand, System.Object[] args) [0x00000] in <filename unknown>:0 at Oxide.Game.Rust.Libraries.Rust.BroadcastChat (System.String name, System.String message, System.String userId) [0x00000] in <filename unknown>:0 at Oxide.Plugins.RadLine.Say (System.String msg, System.String profile, Boolean prefix) [0x00000] in <filename unknown>:0 at Oxide.Plugins.RadLine.Loop (Boolean force) [0x00000] in <filename unknown>:0 at Oxide.Plugins.RadLine.Init () [0x00000] in <filename unknown>:0 at Oxide.Plugins.RadLine.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0 at Oxide.Plugins.CSharpPlugin.InvokeMethod (System.Reflection.MethodInfo method, System.Object[] args) [0x00000] in <filename unknown>:0 at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0 at Oxide.Core.Plugins.CSPlugin.HandleAddedToManager (Oxide.Core.Plugins.PluginManager manager) [0x00000] in <filename unknown>:0 12:21 [Info] Unloaded plugin RAD-Line v3.0.1 by SkinN 12:21 [Info] No previous version to rollback plugin: RadLine
A plugin wouldnt stop it from restarting with the .bat commands though would it? -
I assume it has something to do with you changing the batch script while running the server through the batch script.
I've noticed that when changing the batch file while running the batch script simply quits.
This issue didn't occur on Windows Server 2008, while it did on Windows Server 2012.
The probable cause is explained here: Changing a batch file when its running
"The command interpreter appears to remember the byte offset within each command file it is reading, but the file itself is not locked, so it is possible to make changes, say with a text editor, whilst it is running.
If a change is made to the file after this remembered location, the interpreter should happily continue to execute the now modified script. However if the change is made before that point, and that modification changes the length of the text at that point (for example you've inserted or removed some text), that remembered location is now no longer referring to the start of that next command. When the interpreter tries to read the next 'line' it will instead pick up a different line, or possibly part of a line depending on how much text was inserted or removed. If you're lucky, it will probably not be able to process whatever word it happen to land on, give an error and continue to execute from the next line - but still probably not what you want."
I assume the reason why it occurs on '2012 but not on '2008 is that '2012 probably made changes to the batch implementation, resulting in it behaving differently in non-standardized situations like editing the batch script.
Basically, it skips the goto because it's trying to execute some fragmented command as a result of you changing the file, invalidating the offset pointer, resulting in the batch script quitting.
To solve this issue, set every parameter possible in your server.cfg instead of the launch arguments to avoid having to change the batch script. -
ahh that makes sense...
Yupp im on Windows 2012 too. -
Okay so I installed the TimedExecuted and used the config file for restarting every 6 hours. Now what do I do with this text to get the server automatically turned on?
Code:@echo off :loop RustDedicated.exe <your params> goto loop
-
Wulf Community Admin
-
Code:@echo off cls :start echo Starting server...RustDedicated.exe -batchmode -nographics +server.ip 0.0.0.0 +rcon.ip 0.0.0.0 +server.port 28015 +rcon.port 28016 +rcon.password "changeme" +server.maxplayers 10 +server.hostname "My Oxide Server" +server.identity "my_server_identity" +server.level "Procedural Map" +server.seed 12345 +server.worldsize 4000 +server.saveinterval 300 +server.globalchat true +server.description "Powered by Oxide" +server.headerimage "http://oxidemod.org/styles/oxide/logo.png" +server.url "http://oxidemod.org"echo. echo Restarting server... echo. goto start
-
-