如何在15分钟后使蝙蝠文件停止工作 [英] How can I make a bat file stop working after 15 min

查看:173
本文介绍了如何在15分钟后使蝙蝠文件停止工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何点击一个bat文件停止工作,所以15分钟后它永远无法正常工作?



这可能吗?

How can I make a bat file stop working after it has been clicked so after 15 min it doesn't work forever?

Is this possible?

推荐答案

@echo off
:loop
start yourtarget.exe ...
timeout /t 1200 >null
taskkill /f /im yourtarget.exe >nul
goto loop





这将每20分钟重启你的程序。



我想我会详细说明它的作用以及如何编辑它。

关键部分是超时功能,它是system32中的标准EXE。 1200秒是秒。通过更改它将改变在终止进程并重新启动它之前等待的秒数。



This will restart your program every 20 minutes.

I think I will elaborate on what it does and how you can edit it.
The key part is the "timeout" function witch is standard EXE in system32. The 1200 is the seconds. By changing that it will change the amount of seconds to wait before killing the process and starting it back up again.


这篇关于如何在15分钟后使蝙蝠文件停止工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆