problem with cron jobs
I've tried to automate the update of security patches by doing the following as root:
1. I've written the file /usr/bin/security containing:
2. I've chmod 755 /usr/bin/security
3. I've added the following new job to crontab:
5 8 * * * /usr/bin/security
4. I've checked that by entering /usr/bin/security as root the security patches get updated. This worked fine.
5. At 8am I rebooted, and waited full of expectation...
6. At 8.05am I received an email saying that:
"/usr/bin/security: init: command not found"
How come the command cannot be found by cron, even though it works if entered manually?
How about putting the full path to init...
instead of just "init 6". I think the problem is, you're running the commands manually as the root user and init is found in your path just fine, whereas when run from cron, its not getting the full path to init.
that solved the problem. umk
|All times are GMT -5. The time now is 07:11 AM.|