Investigation when cron does not work well

If you are trying to run it regularly using cron, you will only get the execution log in “/var/log/cron.log”.
Therefore, the following is a reference as a method for letting the execution result of the command be outputted to the file.

1. Standard output
When outputting only standard output
/path/script.sh 1 > /path/exec.log

2. Error output
When only error output is issued
/path/script.sh 2 > /path/error.log

3. Standard output and error output part1
When outputting both outputs to one file
/path/script.sh > /path/both.log 2>&1

4. Standard output and error output No.2
When outputting each output to a separate file
/path/script.sh 1 > /path/exec.log 2> /path/error.log