每2分钟运行批处理和脚本文件,而不是任务调度程序。

时间:2022-05-04 00:16:02

I have two tasks running using windows task scheduler. One is a batch file that extracts data from an application installed in my office computer and a script that opens a macro-enabled excel that retrieves the data that was ran then updates the html website I created. With using task scheduler, the fastest it can run is every 5minutes I'm trying to find out if there is any way that I can have these tasks run every 1-2 minutes instead? Please note, I'm still new to these so if you can explain it simpler terms and instructions, I'll highly appreciate it. :)

我使用windows任务调度程序运行两个任务。一个是批处理文件,它从安装在我办公室计算机中的应用程序中提取数据,另一个脚本打开一个宏支持的excel,它检索所运行的数据,然后更新我创建的html网站。使用task scheduler,它能运行的最快速度是每5分钟我试图找出是否有办法让这些任务每1-2分钟运行一次?请注意,我对这些还不熟悉,所以如果你能解释更简单的术语和说明,我会非常感激。:)

1 个解决方案

#1


1  

You can use command line to create that manual task if you don't mind.

如果您不介意,可以使用命令行创建手动任务。

schtasks /create /tn TaskName /tr TaskRun /sc minute [/mo {1 - 1439}] [/st     HH:MM] [/sd StartDate] [/ed EndDate] [{/et HH:MM | /du HHHH:MM} [/k]] [/it] [/ru {[Domain\]User [/rp Password] | System}] [/s Computer [/u [Domain\]User [/p Password]]]

[/mo {1 - 1439}] is the range of time you wish for it to run, the default is 1 minute.

[/mo{1 - 1439}]是您希望它运行的时间范围,默认值是1分钟。

If you want more info on custom task schedules this will have all that you should need.

如果您想要更多关于自定义任务调度的信息,这将包含您需要的所有信息。

#1


1  

You can use command line to create that manual task if you don't mind.

如果您不介意,可以使用命令行创建手动任务。

schtasks /create /tn TaskName /tr TaskRun /sc minute [/mo {1 - 1439}] [/st     HH:MM] [/sd StartDate] [/ed EndDate] [{/et HH:MM | /du HHHH:MM} [/k]] [/it] [/ru {[Domain\]User [/rp Password] | System}] [/s Computer [/u [Domain\]User [/p Password]]]

[/mo {1 - 1439}] is the range of time you wish for it to run, the default is 1 minute.

[/mo{1 - 1439}]是您希望它运行的时间范围,默认值是1分钟。

If you want more info on custom task schedules this will have all that you should need.

如果您想要更多关于自定义任务调度的信息,这将包含您需要的所有信息。