Capture stdout and stderr. Set the scheduled task to execute program "cmd.exe".
In the arguments field set it like this example:
/c C:\Scripts\MyScript.bat 1>>"C:\Scripts\Logs\MyScript-%date:~10,4%-%date:~4,2%%date:~7,2%.log" 2>&1
That will create a daily log file of all executions of the task. That will capture stdout and stderr for programs that get called.
In the bat file display the date and time and the return code from programs that it executes.
@echo %date% - %time% MyScript is starting.
SomeProgram.exe
@echo %date% - %time% MyScript is ending. SomeProgram RC=%errorlevel%