When I scheduled below command in crontab, the test cases are running fine. But it does not write the log file specified below.
30 03 * * * user cd /home/common_setupwise_testcases && bash setup_wise_test.sh >> /home/testing/cron_logs/setup_wise_test_cases.log
I already tried this: /home/testing/cron_logs/setup_wise_test_cases.log 2>&1
, and I got this output:
{"timestamp": "2017-10-23T10:25:01.387967Z", "event": "2017-10-23", "_": {"ln": 34, "file": "common_mail_triggering.py", "name":"__main__", "fn": "sub_process"}, "level": "error"}
But I want this below format to store in logfile
test_logout (testing_logout.LogOut) ... ok
----------------------------------------------------------------------
Ran 1 test in 5.458s
OK