"killed" message from cron.daily, but not when run from command line
Posted
by
Dan Stahlke
on Super User
See other posts from Super User
or by Dan Stahlke
Published on 2012-09-15T14:31:38Z
Indexed on
2012/09/15
15:40 UTC
Read the original article
Hit count: 253
cron
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.
© Super User or respective owner