This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(8)
该任务必须分两步配置。
首先,您创建一个从每天 0:00 开始的简单任务。然后,进入
高级...
(或类似的操作,具体取决于您所使用的操作系统)并选择每 X 分钟重复
选项,持续 24 小时。这里的关键是找到高级属性。如果您使用的是 XP 向导,它只会在您创建任务后启动高级对话框。
在较新版本的 Windows 上(我想是 7+?):
触发器
选项卡。高级设置
面板下,勾选每xxx分钟重复一次任务
,并根据需要设置无限期
。The task must be configured in two steps.
First you create a simple task that start at 0:00, every day. Then, you go in
Advanced...
(or similar depending on the operating system you are on) and select theRepeat every X minutes
option for 24 hours.The key here is to find the advanced properties. If you are using the XP wizard, it will only offer you to launch the advanced dialog once you created the task.
On more recent versions of Windows (7+ I think?):
Triggers
tab.Advanced settings
panel, tickRepeat task every
xxx minutes, and setIndefinitely
if you need.选择最短重复选项(5 分钟或 10 分钟)后,您可以突出显示该数字并写下您想要的任何数字
After you select the minimum repeat option (5 minutes or 10 minutes) you can highlight the number and write whatever number you want
在使用 schtasks 采纳上述建议时,您可以在 UI 中查看执行每小时任务必须执行的操作。当您编辑触发器时,按计划一次性开始任务(这是关键)。然后您可以选择“重复任务间隔:”1 小时或您希望的任何时间。看截图:
While taking the advice above with schtasks, you can see in the UI what must be done to perform an hourly task. When you edit trigger begin the task on a schedule, One Time (this is the key). Then you can select "Repeat task every:" 1 hour or whatever you wish. See screenshot:
如果您需要更精细的调用之间的粒度,您还可以创建如下所示的批处理文件:
You can also create a batch file like the following if you need finer granularity between calls:
在“重复任务间隔:”中,只需键入 2 分钟,而不是从下拉列表中进行选择。
In the "Repeat Task every:" just type 2 minutes instead of choosing from the dropdown list.
在 XP 上,我单击了
Schedule
选项卡上的Advanced
按钮。有一个重复任务
复选框。默认值为每 10 分钟一次。此外,您还可以通过命令行创建计划任务。我自己没有尝试过,但看起来你想要一些类似的东西(未经测试):
On XP, I clicked the
Advanced
button on theSchedule
tab. There is a checkbox forRepeat task
. The default is every 10 minutes.Additionally, you can create scheduled task via the command line. I haven't tried this myself, but it looks like you'd want something along the lines of (not tested):
要安排自动更新,您应该:
如果您找不到计划设置,请查看:属性、编辑、触发器。
To schedule the update to be automatic you should:
If you cannot find the Schedule settings, look under: Properties, Edit, Triggers.
提供的一些链接仅适用于 Windows 2003 版本的“计划任务”设置。
在 Windows Server 2008 中,“任务”设置仅有一个包含“5 分钟”选项的框、10 分钟、15 分钟、30 分钟和 1 小时”(屏幕截图:http://i46.tinypic .com/2gwx7r8.jpg)...其中 Window 2003 是一个“输入您想要的任何数字”文本框。
我想进行“导出”并编辑 XML:
PT30M
到
PT2M
并将其导入为新任务会“欺骗”任务每 2 分钟重复一次,但它不喜欢这样。
在 Windows 2008 中让任务每 2 分钟运行一次的解决方法是(呃)设置 30 个不同的“触发器” “我的任务每小时重复一次,但盯着 :00、:02、:04、:06 等等……我花了 8-10 分钟来设置,但我只需要做一次:-)
Some of the links provided are only settings for Windows 2003's version of "Scheduled Tasks"
In Windows Server 2008 the "Tasks" setup only has a box with options for "5 Minutes, 10 minutes, 15 minutes, 30 mins, and 1 hour" (screen shot: http://i46.tinypic.com/2gwx7r8.jpg)... where the Window 2003 was a "enter whatever number you want" textbox.
I thought doing an "Export" and editing the XML from:
PT30M
to
PT2M
and importing that as a new task would "trick" Tasks into repeating every 2 mins, but it didn't like that
My workaround for getting a task to run every 2 mins in Windows 2008 was to (ugggh) setup 30 different "triggers" for my task repeating every hour but staring at :00, :02, :04, :06 and so on and so on.... took me 8-10 mins to setup but I only had to do it once :-)