手工創建:我們都是打開任務計划程序新建
通過DOC命令創建定時任務:
(1)Schtasks 創建
schtasks /query /tn "test"
schtasks /delete /tn "test" /f
schtasks /create /sc minute /mo 10 /tn "test" /tr C:\test.bat /f
設置為最高權限(/RL HIGHEST)無交互模式運行(/NP)
schtasks /create /sc minute /mo 10 /tn "connect_jenkins" /trC:\test.bat /RL HIGHEST /NP /f
https://www.cnblogs.com/Sumarua/p/11774129.html
(2)at創建
1、at 12:30 notepad(12:30時運行記事本)
2、at 19:30 calc(19:30時運行計算器)
兩者簡單比較:
windows有一個任務計划程序,可以打開這個程序,創建定時的任務。windows提供了兩個命令行可以創建計划任務,
分別是at和schtasks。schtasks被推薦用來替換at,並且at在win10操作系統中已經不再支持。要使用命令行創建計划任務,必須保證計划任務已經在運行。
詳細鏈接:https://blog.csdn.net/feihe0755/article/details/89527197
https://blog.csdn.net/jataflf/article/details/52788280