I got a daily crontab task:
50 1 * * * sh /my_path/daily_task.sh > /tmp/zen_log 2>&1
This daily_task shell script will run some python scripts and produce a data file.
And it fails for two nights. But when I came in the morning, run the python scripts manually, I got the data file. Or I set a new crontab which only set the date to 0 10 * * *
, and this crontab succeed, too.
So yesterday, I put > /tmp/zen_log 2>&1
in the cron task to get some error message.
And this morning, I got this error message in zen_log:
/my_path/daily_task.sh: line 19: 12364 Killed /usr/local/bin/python2.7 my_python_script.py 2 mix > mix_hc_$datestamp 2>&1
It seems some process has been killed? But what exactly does this line 19: 12364 Killed
mean?
PS:
Today, one minute ago, when I manually run the python script, I got:
/usr/local/bin/python2.7 my_python_script.py 2 mix > mix_hc_$datestamp 2>&1
Killed
line 19
in the script? Maybe posting your script will help us provide you with an answer.line 19
is/usr/local/bin/python2.7 my_python_script.py 2 mix > mix_hc_$datestamp 2>&1
daily_task.sh
? It's hard to understand why it fails around1:50 am
but succeeds at10 am
with the information so far./var/log/messages
I wonder if your script is creating an Out-of-Memory (OOM) error and being killed. Does your system tend to run other system resource hungry scripts/applications/jobs during the late night hours compared to the AM hours?