using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication1 { public class DateTimeHelper { /// <summary> /// 设置本地电脑的年月日 /// </summary
设置定时任务 @echo off set NAME=dailybackup :: set DAY=MON,TUE,WED,THU,FRI,SAT,SUN set COMMAND=cscript.exe %~dp0dailybak.vbs %SystemDrive% cd %windir%\tasks\ if exist %NAME%.job del %NAME%.job schtasks /create /tn %NAME% /tr "%COMMAND%" /sc weekly /d