If you wish to prevent scheduled jobs from running on a holiday, add:
if "%holiday%""Y" go to endlabel
to the beginning of your batch jobs.
Place holiday.dat, containing the holiday dates, in the folder that your scheduled jobs start in. To determine the starting folder:
AT HH:MM /interactive cmd /k
where HH:MM is two minutes from now. When the command prompt opens, you will see the folder. You can also change holiday.dat in holiday.bat to <Drive:>\Folder\holiday.dat.
To determine the format of the date in holiday.dat, type:
On JSI's computers, it returns:
Add as many dates (MM/DD/YYYY) to holiday.dat as you wish. Don't forget to remove old dates and add new ones each year.
Set permissions on holiday.dat so that you have Full Control and the Schedule service account has Read.
Place holiday.bat in the %PATH%. Holiday.bat contains:
for /f "tokens=1* delims=/ " %%i in ('date /t') do set today="%%j"
set today=%today: =%
for /f "Tokens=*" %%i in (holiday.dat) do call :test "%%i"
set fdate=%fdate: =%
if %fdate% EQU %today% set holiday=Y