il you need to run a script unattended and wish to log the output of that script you must already know that you can simply do
the problem with that is you will not log the error messages , only the output messages ,
the error are going to be displayed on the terminal but , not logged
and the error message are often as important as the output message , we do not want to dismiss them from the log ,
the solution to that issue is to run the script using this
With this , both the output will be logged in to the log file.