|
Answer» try to put Mon 10/27/2008 in quotes ("")Thank you.
I ended up working through it prior to seeing your post, and I have successfully tested this:
Code: [Select]@ECHO off
:loop REM set variable to flag file mod date in sys format for /f "tokens=1,2" %%i in (C:\Admin\flag.txt) do ( set dt=%%j ) REM Create variable from sys date parsed to just mm/dd/yyyy for /f "tokens=1,2" %%i in ("%date%") do set sysdt=%%j REM compare flag mod date to sys date IF %dt% EQU %sysdt% GOTO indexer REM ECHO Not Equal REM DATES not same so wait 10 minutes and try again ping -n 601 localhost > nul GOTO loop
:indexer REM ECHO equal REM dates same so close Indexer CALL C:\Admin\EndIndex.bat REM wait for fileserver to come back up ping -n 901 localhost > nul REM start Indexer again CALL C:\Admin\StartIndex.bat
EXIT
Thanks to everyone for all your help!!!!
Now, I just have to wait for an update initiated reboot to see if the script that writes to the flag file will run EVEN with 3rd party initiated reboots. If not, I'll be back to find out more about the SUGGESTION to listen for the reboot event.
|