Windows 任务调度程序可在几秒钟内执行任务 [英] Windows task scheduler to execute tasks in seconds

查看:52
本文介绍了Windows 任务调度程序可在几秒钟内执行任务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找适用于 Windows 7(开发机器)的开源/免费任务调度程序,它允许我安排任务(对 Web 服务的 HTTP 请求)每 x 秒运行一次.

我尝试了几个 Cron 克隆和 Windows 自己的任务计划程序,但似乎都不允许任务以小于 60 秒的间隔运行.我错过了什么吗?如果可能的话,我也不想去编写任何自定义脚本.

解决方案

可以为一个计划任务创建多个触发器.如果您创建 59 个相同的触发器,彼此之间的偏移为 1 秒,并且将任务本身安排为每分钟运行一次,那么您最终将安排的任务每秒钟运行一次.

您可以使用 GUI 手动创建这 59 个触发器.但是,创建这么多触发器的更快方法是创建一个带有一两个触发器的任务,将其导出到文本文件,复制相应的行,相应地更改起始偏移量,然后重新导入文件.

I'm looking for an open source/free task scheduler for Windows 7 (development machine) that will allow me to schedule tasks (HTTP requests to a web service) to run every x seconds.

I've tried a couple of Cron clones and windows own Task Scheduler but neither seem to allow tasks to run at intervals less than 60 seconds. Am I missing something? I don't want to have to go and write any custom scripts either if possible.

解决方案

It is possible to create multiple triggers for one scheduled task. If you create 59 identical triggers with an offset of 1 second to each other, and schedule the task itself to run every minute, you end up the scheduled task to run every second.

You could create those 59 triggers manually using the GUI. However, a much quicker way to create so many triggers is to create a task with one or two triggers, export it to a text file, duplicate the according lines, change the start offsets accordingly, and then re-import the file.

这篇关于Windows 任务调度程序可在几秒钟内执行任务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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