schtasks/create(具有每天运行并每小时重复一次的任务 [英] schtasks /create (Have a task that runs every day and repeats every hour

查看:399
本文介绍了schtasks/create(具有每天运行并每小时重复一次的任务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

很抱歉,是否有人问过这个问题或类似问题,我希望我错过了一些愚蠢的事情,这很容易,但是.我该如何使用schtasks /create命令执行一项任务,该命令每天从7点开始,然后无限期或在一天的时间内每小时重复一次?

Sorry if this or similar has been asked, and I hope I'm missing something stupid and this is easy, but. How do I make a task using the schtasks /create command that will start say every day at 7 and repeat every hour either indefinitely or for the duration of a day?

如果我愿意

schtasks /create /tn "test" /tr "\"C:\Program Files\test.exe"" /sc HOURLY /mo 1

仅当击中指定的日期和时间时才会触发.

it will only trigger if the specified date and time are hit.

如果我愿意

schtasks /create /tn "test" /tr "\"C:\Program Files\test.exe"" /sc DAILY /mo 1

每天只会触发一次.

提前谢谢!

推荐答案

弄清楚了,重复间隔本质上就是我需要的以及持续时间

Figured it out, Repeat Interval is essentially what I needed along with duration

下面是如何安排某件事在每天1小时的每天7:00运行,持续1天的时间.

Below is how to schedule something to run at 7:00 every day every 1 hour for a duration of 1 day.

schtasks /create /tn "test" /tr "\"test.exe"" /sc DAILY /st 07:00 /f /RI 60 /du 24:00

这篇关于schtasks/create(具有每天运行并每小时重复一次的任务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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