首页 > 解决方案 > 重启批处理脚本

问题描述

我正在尝试让 FiveM 服务器自动重启。目前,这是您启动服务器的方式

echo on
title FiveM
cd %~dp0
:loop
%~dp0run.cmd +exec server.cfg %*
timeout /t 6 >null
taskkill /f /im FiveM >nul
timeout /t 30 >null
goto loop```

pause

我希望我的服务器在 1 小时后自动重启。要正常停止脚本,您需要 cntrl+c。

我该怎么做?

标签: filebatch-filerestartauto

解决方案


推荐阅读