• 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

  • 相关阅读:
    lambda 是个啥玩意
    python中读写操作plist
    通过os中的os.path.basename获取路径中的文件名
    python遍历目录的两种方法
    mac下已有pyhon2.7,装了python3 之后,怎么调用python3啊
    Python: easy_install & pip 下载PyPi 公共资源库的工具
    安装python的图形处理库: pillow
    minSdkVersion, targetSdkVersion, targetApiLevel,compileSdkVersion,buildToolsVersion
    bat 批量修改文件名字
    a b两向量叉乘 <0说明a在b左边
  • 原文地址:https://www.cnblogs.com/king-/p/4095121.html
Copyright © 2020-2023  润新知