-
Cron Help Needed
I have created a basic crontab in Solaris 8 , shown below
* * * * * date
Within the /var/cron/log I am getting the following error:
> CMD: date
> smuser 5904 c Wed Jun 22 12:49:00 2005
< smuser 5904 c Wed Jun 22 12:49:00 2005
exec failed. errno=2.
The above crontab was made simple to see if my real crontab was not defined correctly. But ofcourse it does not make a difference.
I have searched google.
Any thoughts?
-
Could you humour me and try a different command ? For example :
5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/sbin/ntpdate time.xmission.com
(note, if you want to keep this entry, would recommend backing off of the timing from every 5 minutes to maybe every 12 hours). I am thinking that either the program is returning a code of 2 (hence the error) or possibly there is a problem with the command you are trying to issue.
Don't forget to SIGHUP cron when you change it. Also, the cron job itself...are you doing a root cron job or are you trying to use a less privelaged user (that can make a difference and there are other things you have to do) ?
-
I have tried other commands. I was just using one that was pretty basic.
The command that I am running is:
5,10,15,20,25,30,35,40,45,50,55 * * * * /opt/netegrity/siteminder/policy_bkups/smuser
The script runs fine, if ran manually.
I am using a less privelaged account. I have added the account into the /etc/cron.d/cron.allow and verified that the account did not exist in the /etc/cron.d/cron.deny.
I have never had this much difficulty before.
Thanks
-
Sounds like you have the cron side set up right. Could it possibly be an environment variable issue ? Ie, if you are in an interactive shell a necessary env var is set (env), but it isn't set when cron is trying to run it ? Are any of your cron jobs working ?
-
None of the scripts I have tried are working. There are some owned by root that are.
I was thinking that it may be an environment issue but that is why I was trying to just run "date" since that should not need a specific variable.
Thanks
-
Try taking what environment variables are defined in your interactive shell (env) and putting them in /etc/default/cron. I am wanting to say this is where you can set variables for the cron environment, if that fails try putting them in /etc/profile.
-
It made no difference.
Thx