To capture/log all output of a BAT file to a log file during scheduled report generation, create an additional BAT file which is called your primary BAT file and redirects the generated output. The script below shows the detailed commands. It also captures all output when a script file is started from Windows Task Scheduler.
This sample script code is provided in <Report Tool installation folder>\startnlog.bat.
startnlog.bat
REM a starter script to log all output of a BAT script REM Call from Windows Task Scheduler to have the same log as on CMD prompt REM You could create a more fancy filename for the log containing a timestamp REM This will overwrite the log on each run
cd C:\scripts webreport.bat > loglastrun.txt echo finished
|