![]() |
#!/bin/sh -
does work - although I do not know what the - is for. periodic is set: -r-xr-xr-x 1 root wheel 2875 Jul 14 16:57 /usr/sbin/periodic Also - I manually called: periodic daily (as root) and that worked fine I also individually ran the two script that periodic daily runs and they both ran fine. Very odd indeed....I thought for sure this was an easy one....for someone with more knowledge that me in shell scripting. |
how about pointing us to where you got your periodic from and we could try to duplicate your problem? it is a head scratcher.
|
bluehz,
From what I know, /etc/crontab is not the root users crontab, and thus behaves a little differently than a user's crontab. When using /etc/crontab, you have to specify the user the operation should run as. It should then honor the variables defined in the config file. Have you tried to make an entry something like: 51 *9 * * * root /usr/sbin/periodic -u xxx.xxx.x.x Also, if you do crontab /etc/crontab and you fill roots' mailbox with "not found messages", the thing to do then, would be to login as root and crontab -r should do the trick. Cheers... |
This is an old thread, but for those who may stumble on this:
/etc/crontab is different from user crontabs. Former has a field to specify the username to run command as, latter does not. Now, even root has a "user" crontab. This is different from /etc/crontab. It looks like the original poster had accidentally run "crontab /etc/crontab" as root. In other words, made /etc/crontab as root user's crontab. Because latter cannot specify a user, it was treat as command and hence the "sh: root: cannot find command" error message. The solution is to remove this unwanted crontab entry. It should be in /var/spool/crontab/root (or similar -- check "man cron" to find the directory) and remove the crontab created for root. And DO NOT run the command "crontab /etc/crontab" -- that'll make a copy of /etc/crontab as the current user crontab, and that'll never work as /etc/crontab uses a different format than user crontab. ~talkative |
| All times are GMT -5. The time now is 06:12 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.