|
Answer» this problem is associated with my SERVER (Windows Server 2003 R2 Enterprise x64 EDITION)
I have two scheduled tasks which runs two batch files respectively (let's called them A.bat and B.bat) on 2am and 7am everyday. The things they do are quite similar, exporting dump files in DATABASE for different schema (around 10 schema for A.bat and around 6 for B.bat) and zipping them accordingly.
Dump files for different schema are exported successfully but some of them couldn't be zipped. Usually those dump files which could not be zipped are created after 7am. I managed to do the zipping (7-zip) in parallel in cmd so parallel zipping should not be causing the problem. One strange thing that I observed is that the batch file continues to run, exporting dump file for next schema, even though it didn't zip the dump file for current schema. And usually A.bat doesn't execute the "goto endloop"
There is no sign of error in the log that I have kept. Below is part of the batch file,
:loop if %curr_schema%==END goto endloop if %count% GEQ 1000 goto endloop exp PARFILE=%backup_root_dir%\%curr_schema%.par "C:\program files\7-zip\7z" a -t7z %dest%\%curr_schema%_%curdate%.7z %dest%\%curr_schema%_%curdate%.dmp >> %logfile% goto loop :endloop echo done!How does the variable %count% get incremented? And does either of the paths you supply to 7-zip contain spaces?
I do the increment by set /a count=%count%+1
All paths I supply to 7-zip contain no space.I think it would be beneficial to everyone if we could SEE each batch file in its entirety and see how the Tasks are scheduled in Task Scheduler.
Quote from: Squashman on December 08, 2011, 05:25:17 AM I think it would be beneficial to everyone if we could see each batch file in its entirety and see how the Tasks are scheduled in Task Scheduler.
+1
|