Arma3自动重启服务器,自动重启定时重启崩溃重启批处理

该楼层疑似违规已被系统折叠 隐藏此楼查看此楼

这个给服务端用的

新建start.bat粘贴内容

@echo offclsset gameserver=exiletitle %The Fluffy Basement% Kcgamesset link=http://www.Kcgames.netStart iexplore "%link%":startREM How long until auto restart?set hours="4"set minutes="0"set seconds="0"REM // Launch parametersstart "arma3" "arma3server.exe" -enableHT -autoinit -servermod=@ExileServer -mod=@exile -config=@ExileServer\config.cfg -port=2302 -profiles=exile -cfg=@ExileServer\basic.cfg -name=exileREM You do not need to update anything else below this line REM Pull, display and create some time functionsfor /f "delims=" %%G IN ('powershell "(get-date %time%).AddHours(%hours%).AddMinutes(%minutes%).AddSeconds(%seconds%).ToString('yyyyMMddHHmmss')"') do set endtime=%%Gfor /f "delims=" %%G IN ('powershell "(get-date %time%).ToString('HH:mm:ss')"') do set nowtimeclean=%%Gfor /f "delims=" %%G IN ('powershell "(get-date %time%).AddHours(%hours%).AddMinutes(%minutes%).AddSeconds(%seconds%).ToString('HH:mm:ss')"') do set endtimeclean=%%Gecho %time% - %gameserver% Server started at %nowtimeclean% and will restart at %endtimeclean%:checkarmafor /f "delims=" %%G IN ('powershell "(get-date %time%).ToString('yyyyMMddHHmmss')"') do set nowtime=%%GREM // TIMER CHECK ///if "%nowtime%" gtr "%endtime%" (echo %time% - It is time to restart %gameserver%!echo.echo.goto restartarma)REM // END TIMER CHECK ///REM // PROCESS CHECK ///tasklist /FI "IMAGENAME eq arma3server.exe" 2>NUL | find /I /N "arma3server.exe">NULif "%ERRORLEVEL%"=="1" (echo %time% - The process is not running, restart %gameserver%!echo.echo.goto restartarma)REM // END PROCESS CHECK ///REM restart not needed. Check again in 3 seconds.TIMEOUT /T 3 /NOBREAK >NULgoto checkarma:restartarmaREM Either the server crashed or it is time for a restart. Kill the process and go to start.START taskkill /f /im arma3server.exe 2>nulTIMEOUT /T 3 /NOBREAK >NULgoto start

参数啊,重启时间自己可以改改

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值