I have a batch script that contains the code below.  The script is set to run on a Windows 2003 schedule every Monday at 1:00 AM.  However, instead of doing a weekly report from the previous Sunday to the Saturday before this Monday, it seems to be doing the previous week's report.  I've checked the FROM/TO sections and the script seems to spit out +F-00-00-08 +T-00-00-02, which if run on a Monday would be correct.  But for the life of me, I can't figure out why the report says:
 
3. Program start time Jul 18, 2005 01:00
4. Time of first request Jul 10, 2005 00:00
5. Time of last request Jul 16, 2005 23:47
 
Anyone had a similar experience with schedulers and scripts?
 
Thanks,
Bassam
 
**************************************************************
 
@ECHO OFF
 
FOR /f "tokens=1-4 delims=/.- " %%A in ('DATE /T') DO (SET DOW=%%A)
 
SET S=+F-00-00-
SET F=+T-00-00-
 
IF %DOW%==Sun (
   SET DAYSTART=%S%07
   SET DAYFINISH=%F%01
)
IF %DOW%==Mon (
   SET DAYSTART=%S%08
   SET DAYFINISH=%F%02
)
IF %DOW%==Tue (
   SET DAYSTART=%S%09
   SET DAYFINISH=%F%03
)
IF %DOW%==Wed (
   SET DAYSTART=%S%10
   SET DAYFINISH=%F%04
)
IF %DOW%==Thu (
   SET DAYSTART=%S%11
   SET DAYFINISH=%F%05
)
IF %DOW%==Fri (
   SET DAYSTART=%S%12
   SET DAYFINISH=%F%06
)
IF %DOW%==Sat (
   SET DAYSTART=%S%13
   SET DAYFINISH=%F%07
)
@ECHO ON
 
"analog 6.0\analog.exe" -G +gUSDA.cfg %DAYSTART% %DAYFINISH%
ReportMagic\rmagic.exe USDA.ini -reports_File_Out=\\Mama\F$\websites\Development\Analog\%CP_Name%\Weekly\ -statistics_File_In=%OUTFILE% -statistics_Log_File=%ERRFILE% -website_Title=%TITLE% -website_Webmaster=%WEBMASTER%
+------------------------------------------------------------------------
|  TO UNSUBSCRIBE from this list:
|    http://lists.meer.net/mailman/listinfo/analog-help
|
|  Analog Documentation: http://analog.cx/docs/Readme.html
|  List archives:  http://www.analog.cx/docs/mailing.html#listarchives
|  Usenet version: news://news.gmane.org/gmane.comp.web.analog.general
+------------------------------------------------------------------------

Reply via email to