windows - Windows Server 2003/2008 上的计划程序任务持续时间不确定

标签 windows scheduling

Schtasks /create /s $server /ru $user /rp $password /tn $taskName /sc MINUTE /mo $intervalMin /tr $cmd

此命令在调度程序中创建一个每分钟执行一次的任务。

  • 在 Windows Server 2008 上,持续时间为“无限期”
  • 在 Windows Server 2003 上,持续时间为“1 天”

如何解决这种奇怪的行为?

最佳答案

解决方案是这样创建任务:

schtasks /create /s $server /sd $startdate /st $starttime /ru $user /rp $password /tn $taskName /sc daily /mo $scheduleDays /tr $cmd /RI $intervalMin /DU $duration

创建每日任务,设置/RI = 1(分钟)和/DU = "24:00"/mo = 1(天)

该任务将在 Server 2003 上每分钟永久执行‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ ‎‎‎‎‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎

关于windows - Windows Server 2003/2008 上的计划程序任务持续时间不确定,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4993941/

相关文章:

java - 在 while 循环中检查数据库值的替代方法

performance - 调度最优记录列表的算法

scheduling - 哪些因素决定了独立模式下执行程序的数量?

c++ - Windows API编程为什么需要RegisterClass?

python - 无法删除/取消链接到 python 和 Windows 中目录的符号链接(symbolic link)

prolog - 日程规划策略

java - 为什么 ScheduledExecutorService 不公开在特定时间运行的方法

c++ - 休眠失败时的 Windows 通知

windows - 桌面应用程序转换器/提交到 Windows 应用商店

c - 为什么我在 StartService 上收到错误代码 6?