2am daily reboot

This commit is contained in:
2024-03-14 19:20:43 -05:00
parent 678e45ce6b
commit 71687e39c8
+6 -2
View File
@@ -213,8 +213,12 @@ public class WorldServer {
LocalDateTime currentTime = LocalDateTime.now(); LocalDateTime currentTime = LocalDateTime.now();
if(currentTime.getHour() == 2 && currentTime.getMinute() == 0){ if(currentTime.getHour() == 2 && currentTime.getMinute() == 0){
//daily reboot //daily reboot
Runtime rt = Runtime.getRuntime(); try {
rt.exec("./mbrestart.sh"); Runtime rt = Runtime.getRuntime();
rt.exec("./mbrestart.sh");
} catch (java.io.IOException err) {
Logger.info(err.getMessage());
}
} }
if (LocalDateTime.now().isAfter(nextHeartbeatTime)) { if (LocalDateTime.now().isAfter(nextHeartbeatTime)) {
SERVERHEARTBEAT.tick(); SERVERHEARTBEAT.tick();