From 71687e39c8a5e309c035c26ad8c8064ce7d7a514 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Thu, 14 Mar 2024 19:20:43 -0500 Subject: [PATCH] 2am daily reboot --- src/engine/server/world/WorldServer.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/engine/server/world/WorldServer.java b/src/engine/server/world/WorldServer.java index 0b348715..3dca8c97 100644 --- a/src/engine/server/world/WorldServer.java +++ b/src/engine/server/world/WorldServer.java @@ -213,8 +213,12 @@ public class WorldServer { LocalDateTime currentTime = LocalDateTime.now(); if(currentTime.getHour() == 2 && currentTime.getMinute() == 0){ //daily reboot - Runtime rt = Runtime.getRuntime(); - rt.exec("./mbrestart.sh"); + try { + Runtime rt = Runtime.getRuntime(); + rt.exec("./mbrestart.sh"); + } catch (java.io.IOException err) { + Logger.info(err.getMessage()); + } } if (LocalDateTime.now().isAfter(nextHeartbeatTime)) { SERVERHEARTBEAT.tick();