"killed" message from cron.daily, but not when run from command line
- by Dan Stahlke
On Fedora 17, I put a file into /etc/cron.daily with the following contents:
cd /
su dstahlke /home/dstahlke/bin/anacron-daily.sh
exit 0
For some reason, I get a mail every day that just says
/etc/cron.daily/dstahlke-daily:
...killed.
I tried with and without the exit 0 line above (I noticed that some system scripts have that and others don't, I'm not sure of the purpose). Running /etc/cron.daily/dstahlke-daily from the command line as root produces no ...killed message. Other than the message, everything seems to work fine. Putting set -x in the above script, as well as in the /home/dstahlke/bin/anacron-daily.sh script shows that the ...killed message happens just after the latter script terminates (or perhaps just after the su command finishes).
What causes the ...killed message?
Or, is there a more acceptable way to have anacron run a user script daily? I figured that putting this in /etc/cron.daily would help the system coordinate all of the daily tasks rather than potentially running my task concurrently with the system tasks.