file - 重启批处理脚本
问题描述
我正在尝试让 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。
我该怎么做?
解决方案
推荐阅读
- gradle - Gradle - 从测试模块运行应用程序
- python - 使用 Python 的循环和 if 语句创建回文检查器
- html - React.js - 将 JSX 转换为原始 HTML 字符串
- java - 无法加载亚马逊移动广告
- swiftui-list - VStack 中的 SwiftUI 切换未对齐
- amazon-web-services - 时间戳范围之间的 AWS Appsync 订阅过滤器
- javascript - 单击左侧的项目将添加到右侧的框中
- python - 如何在 Django 框架中添加 Mac 地址
- r - 将每日数据系列重新排序为每周行,其中周一、周二、周三、周四和周五作为每周列
- python - 在 python 循环中从 csv 文件中跳过空白单元格