zoukankan      html  css  js  c++  java
  • Windows下的定时任务

    计划任务每 20 分钟运行一次。
    schtasks /create /sc minute /mo 20 /tn "Security Script" /tr c:appsmyapp.exe
    计划命令每五小时运行一次
    schtasks /create /sc hourly /st 00:05:00 /tn "My App" /tr c:appsmyapp.exe
    计划任务每天运行一次
    schtasks /create /tn "My App" /tr c:appsmyapp.exe /sc daily /st 08:00:00 /ed 12/31/2001
    计划任务每隔一天运行一次
    schtasks /create /tn "My App" /tr c:appsmyapp.exe /sc daily /mo 2 /st 13:00:00 /sd 12/31/2001

    计划任务每六周运行一次
    schtasks /create /tn "My App" /tr c:appsmyapp.exe /sc weekly /mo 6 /s Server16 /ru Admin01
    计划任务每隔一周在周五运行
    schtasks /create /tn "My App" /tr c:appsmyapp.exe /sc weekly /mo 2 /d FRI

    计划任务在每月的第一天运行

    下面的命令计划 MyApp 程序在每月的第一天运行。因为默认修饰符是 none(即:没有修饰符),默认天是第一天,默认的月份是每个月,所以该命令不需要任何其它的参数。

    schtasks /create /tn "My App" /tr c:appsmyapp.exe /sc monthly
    计划任务在每月的最后一天运行

    下面的命令计划 MyApp 程序在每月的最后一天运行。它使用/mo参数指定在每月的最后一天运行程序,使用通配符 (*) 与/m参数表明在每月的最后一天运行程序。

    schtasks /create /tn "My App" /tr c:appsmyapp.exe /sc monthly /mo lastday /m *
    计划任务每三个月运行一次

    下面的命令计划 MyApp 程序每三个月运行一次。.它使用/mo参数来指定间隔。

    schtasks /create /tn "My App" /tr c:appsmyapp.exe /sc monthly /mo 3
    计划任务在每月的第二个周日运行

    下面的命令计划 MyApp 程序在每月的第二个周日运行。它使用/mo参数指定是每月的第二周,使用/d参数指定天。

    schtasks /create /tn "My App" /tr c:appsmyapp.exe /sc monthly /mo SECOND /d SUN
    计划任务在五月和六月的第 15 天运行。

    下面的命令计划 MyApp 程序在五月 15 日和六月 15 日的 3:00 PM (15:00) 运行。它使用/d参数来指定日期,使用/m参数指定月份。它也使用/st参数来指定开始时间。

    schtasks /create /tn "My App" /tr c:appsmyapp.exe /sc monthly /d 15 /m MAY,JUN /st 15:00:00

  • 相关阅读:
    C++出现 error: no match for 'operator==' (operand types are 'Person' and 'const Person')
    python三元运算符公式/出错怎么看
    我学函数遗漏的东西
    学习函数时一些没注意到的地方
    Python文件操作回顾
    我学习python没有记住的东西
    转载
    UE SC -kismetmathlibrary
    LineTrace跟Overlap开销
    UE4 插件无法读取常见错误
  • 原文地址:https://www.cnblogs.com/king-/p/4095121.html
Copyright © 2011-2022 走看看