@echo off rem *** SCHEDULE.CMD: Schedules target to automake at specified time. *** rem rem SYNTAX: SCHEDULE target time [DAILY/weekday(s)] rem rem PARAMETER: rem rem target rem computer, lab, or group of labs to which to copy commands. rem rem time rem time to schedule automake, expressed in 24-hour time (HH:MM, e.g. rem 15:30) or with an a or p appended (e.g. 3:30p). If nothing else rem is specified, automake runs only once. rem rem DAILY rem sets automake to run every day at specified time until cancelled rem by CLEAR or similar command. rem rem weekday(s) rem schedules automake to run one or more weekdays at specified time rem until cancelled by CLEAR or similar command. Specify weekdays as rem 1- or two letter abbreviations, separated by commas; thus, writing rem M,T,W,Th,F,S,Su is the same as writing daily. rem Requires massproc.cmd, timeout.exe. setlocal enableextensions set target=%1 set time=%2 set perm=%3 if defined perm call :setperm set conftext=schedule a %time% automake on :main call massproc.cmd if defined exit goto end at %unc% %time% %perm% autodist.cmd > nul at %unc% goto main :setperm if /i %perm% EQU daily ( set perm=/every:M,T,W,Th,F,S,Su ) else ( set perm=/every:%perm% ) goto :EOF :end timeout 10 endlocal