windows - 批处理 : How to run a program when the computer is idle and stop when it's used?

标签 windows batch-file

我需要运行一个 Windows 批处理(或任何其他命令行软件都可以),它会在计算机闲置一分钟时运行一个程序,并在使用时停止它。当它再次空闲时,我显然应该重新启动它。

有什么想法吗?找不到任何不使用 GUI 的内容。

最佳答案

如果您使用的是 Win-7,则可以在任务计划程序中执行此操作。打开任务计划程序,选择我的任务计划,然后选择创建任务(不是创建基本任务)。为其命名,单击“操作”选项卡并选择要运行的程序。选择“条件”选项卡,单击“如果空闲 xxx 分钟则运行”,并选中如果计算机不再空闲则停止运行。

关于windows - 批处理 : How to run a program when the computer is idle and stop when it's used?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21069044/

相关文章:

python - 无法在 Windows cmd 中添加 Python

c++ - win32应用程序、windows窗体应用程序和控制台应用程序有什么区别?

.net - .NET 的 SuppressKeypress 如何/为何工作?

bash - bash脚本在多个docker-compose环境中运行测试

windows - 如何在 Windows 批处理文件中嵌入文本文件

c++ - 为 HTML 5 编译 Minko 引擎 SDK 时出错

mysql - 在带有重音的批处理文件上执行sql脚本

windows - 使用 wicked_pdf 拒绝权限

windows - GVim 重新聚焦缓慢

windows - 在文件前面插入文本