关闭机器在空闲与批处理文件后? [英] Shut down machine after being idle with batch file?

查看:160
本文介绍了关闭机器在空闲与批处理文件后?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我甚至不知道这是可能的,但反正是有(N)分钟后关闭机器,使用批处理文件?

I don't even know if this is possible, but is there anyway to shut down a machine after (n) minutes, using a batch file?

目前我已经有一个批处理文件,它的工作原理一起ranorex和虚拟机,以及我需要的机器自行关闭它已经闲置了10分钟左右后,只给在批处理文件中大量的一切时间来运行。是否有这样做的方法吗?

Currently I already have a batch file which works alongside ranorex and a virtual machine, and I need the machine to shut itself down after it has been idle for 10 minutes or so, just to give everything else in the batch file plenty of time to run. Is there any way of doing this?

推荐答案

只需使用命令关机,并添加选项的等待时间:

Just use the command for shutdown and add the option for the time to wait:

shutdown /s /t 600 /f


  • / S 是关闭计算机

  • /吨是做等操作前有时间,以秒(10 * 60 = 600)

  • /˚F是强制关闭所有应用程序

    • /s is for shutting down the computer
    • /t is for wait before do the operation with time in seconds (10*60=600)
    • /f is for forcefully close all applications
    • 使用关机/ A 以前生产的时间逃跑,你可以中止行动。有关更多选项使用关机的帮助 -command。

      With shutdown /a you can abort the action befor the time runs off. For more options use the help of the shutdown-command.

      这篇关于关闭机器在空闲与批处理文件后?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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