Home >  User Guide - UPLINX Report Tool > Generating Reports from the Command Line for Scripting and Scheduling > Example 4.1 - Scheduled Reports and Logging

  Example 4.1 - Scheduled Reports and Logging

 

 

 

 

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

 

 

 

 

Copyright © 2024 UPLINX - Last updated 18 Nov 2024