ObamaCare Posted May 5, 2014 Report Share Posted May 5, 2014 Sorry if the title sounds confusing, but does anybody know of a way to run restarts based on when the server was last started? For example, I want to run restarts every 4 hours, I start my server at 0:00, but at 1:00 I do a manual restart because I changed something, is there a way to now make the server restart at 5:00 instead of 4:00 as scheduled? Link to comment Share on other sites More sharing options...
jahangir13 Posted May 6, 2014 Report Share Posted May 6, 2014 I have the same problem but did not had the time to really think about it. I warn my users via the battleye restarts script from this forum which is accurate (if scheduled via cron) to the restart time of cron (so system time). My debug monitor has this normal function to calculate the restart time which can be found everywhere but that is not accurate anymore if you restart manually between 2 automatic restarts by cron. I think you could also do the restarts completely from the game if you determine somewhere in a script how long the mission is already running and if it's time to restart (or for warnings) you write something to the diag_log what could be parsed by writer.pl to execute restarter.pl which then actually does the restart. Something like that as an idea. Devd wrote somewhere in another post that he would do it via the game but he did not really explain how. But that's something on my list to think about. Link to comment Share on other sites More sharing options...
ObamaCare Posted May 6, 2014 Author Report Share Posted May 6, 2014 Okay, thanks, so I have a countdown timer on my Debug Menu until restarts, so would I add a custom script, and have it check for a certain uptime, then when that time is reached, it executes restarter.pl? Link to comment Share on other sites More sharing options...
jahangir13 Posted May 6, 2014 Report Share Posted May 6, 2014 Hm, I don't know if a player which loads the mission file can determine how long the mission is already running. Maybe that needs to be done serverside...but maybe somewone else knows better how that works. It was just an vague idea. I did not try anything here so far. Link to comment Share on other sites More sharing options...
ObamaCare Posted May 6, 2014 Author Report Share Posted May 6, 2014 Yeah, it would need to be run serverside. I think I'll go ahead and try to put something together. Link to comment Share on other sites More sharing options...
LunatikCH Posted May 6, 2014 Report Share Posted May 6, 2014 make the restarts with BEC so it will load the infos from sheduler.xml and if you have set in there every 4h restart it will do your restart 4h after the server starts up Link to comment Share on other sites More sharing options...
jahangir13 Posted May 6, 2014 Report Share Posted May 6, 2014 If you tell us how you run it with wine? I read a post that it is possible with some patches you compile into it but I did not manage it so far. But I guess you are talking about the windows server? Link to comment Share on other sites More sharing options...
DeanReid Posted May 6, 2014 Report Share Posted May 6, 2014 Okay, thanks, so I have a countdown timer on my Debug Menu until restarts, so would I add a custom script, and have it check for a certain uptime, then when that time is reached, it executes restarter.pl? Hm, I don't know if a player which loads the mission file can determine how long the mission is already running. Maybe that needs to be done serverside...but maybe somewone else knows better how that works. It was just an vague idea. I did not try anything here so far. The Mission uptime is calculated when The mission is first loaded (Server Start usually or 1 or 2 minutes after), I don't believe it is calculated when the user joins, so It could work the way you mentioned Could be wrong though, The only problem I see with that is if your mission file is huge and takes a long time to load then that could become a problem, Best thing you could check out is restart the server, Join and see how long you are stuck on the map/lobby for and how long until you can actually play Link to comment Share on other sites More sharing options...
ObamaCare Posted May 6, 2014 Author Report Share Posted May 6, 2014 Alright, on my server it takes about 10 seconds to load the mission fully (longer for my computer to load the mission than the server). Do you know which file (if any) defines all the server variables (such as dayz_survived)? Link to comment Share on other sites More sharing options...
jahangir13 Posted May 6, 2014 Report Share Posted May 6, 2014 The only one I know is dayz_code/init/variables.sqf from the client files. Link to comment Share on other sites More sharing options...
RipSaw Posted May 7, 2014 Report Share Posted May 7, 2014 Set the BEC scheduler to 040000 instead of 04:00:00 Link to comment Share on other sites More sharing options...
ObamaCare Posted May 8, 2014 Author Report Share Posted May 8, 2014 Isn't BEC windows/wine only? Because I don't have that, and have no intention of having wine on my server at all. Link to comment Share on other sites More sharing options...
jahangir13 Posted May 8, 2014 Report Share Posted May 8, 2014 Yes...but people tend not to read anything anymore. They just write. i guess it's a modern smartphone disease ;) Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now