NO! You have to put the 2>&1 part behind or it will not display error messages in the log!is this correct?
* * * * * cd /root/dashman/sentinel && venv/bin/python bin/sentinel.py 2>&1 >> sentinel-cron.log
* * * * * cd /root/dashman/sentinel && venv/bin/python bin/sentinel.py >> sentinel-cron.log 2>&1
Yep, that's right. 2>&1 will redirect STDERR to STDOUT when being used like you mentioned. Else, it will only write the output of the command to the file, but not error messages. The order is important.NO! You have to put the 2>&1 part behind or it will not display error messages in the log!
I learned that with the last sentinel bug...
Code:* * * * * cd /root/dashman/sentinel && venv/bin/python bin/sentinel.py >> sentinel-cron.log 2>&1