I have a script
running via crontab
It runs perfectly till a certain time and print
statements show up in the log
file.
After this particular time, the log file doesn't have any more entries.
I checked whether the script
is still running:
ps aux | grep script_name
Shows in the results:
>ubuntu 19748 0.0 0.0 4636 820 ? Ss 09:15 0:00 /bin/sh -c python3 /home/ubuntu/ib/op_script/process.py > /home/ubuntu/logs/process.log 2>&1
>ubuntu 19751 0.1 9.4 812908 381100 ? Sl 09:15 0:23 python3 /home/ubuntu/ib/op_script/process.py
>ubuntu 23161 0.0 0.0 14860 1080 pts/0 S+ 13:57 0:00 grep --color=auto process
I checked the free memory:
free -h
Output:
total used free shared buff/cache available
Mem: 3.8G 1.4G 208M 12M 2.2G 2.1G
Swap: 0B 0B 0B
I am not sure how to check what the error might be, or if the script is still doing its functions just not writing to the log
file.
Note: the functions are repetitive in a while
loop and have run multiple times before.
I am not sure what would be the reason for no print
statements coming