I have a cron job that executes once per day:
0 20 * * * /usr/bin/wget --timeout=10800 -O /home/File.txt http://www.site.com/script.php
and so far all was fine, but recently I found out the script just stops.
I looked in the /var/log/httpd/error_log
(it's a CentOS) and found this:
[Thu Nov 21 21:30:32 2012] [notice] child pid 8985 exit signal Segmentation fault (11)
Now, this means two things: the script was successfully running for about hour and a half, but then the segmentation fault happened. Ususally the script takes around 2 hours to complete, so it lacks around half an hour to complete it's job.
Now, I can't find the error which causes the script to stop even though I do have error_reporting turned on.
I'm wondering, is there some way so that I can find a potential error line which caused the script to terminate?
I did try google, and SO, ofc, and tried to achieve the same as on this question here on SO by doing this:
0 20 * * * /usr/bin/wget --timeout=10800 -O /home/File.txt http://www.site.com/script.php 2>1& >> /home/log.txt
but the log file is empty. I'm not so good at managing linux so it may be that my command is wrong in this cronjob, so please steer me right.