No config,lua ja possui esse negoço de autoshutdown.
-- Global save
-- NOTE: globalSaveHour means like 03:00, not that it will save every 3 hours,
-- if you want such a system please check out data/globalevents/globalevents.xml.
globalSaveEnabled = false -- Deixe true
globalSaveHour = 8 -- Horario que o servidor ira desligar
globalSaveMinute = 0
shutdownAtGlobalSave = true -- True para o servidor desligar, false para nao desligar
cleanMapAtGlobalSave = false -- Limpar mapa com Global Save
closeInstanceOnShutdown = true