Operating System - HP-UX
1834461 Members
2745 Online
110067 Solutions
New Discussion

Can't get amdsp to work from cron

 
SOLVED
Go to solution
Tom Gore
Regular Advisor

Can't get amdsp to work from cron

We have been having problems with ISEE notifiying us when an error has been encountered on the FC60 disk array so I thought I'd put together a script using "amdsp -a ". I send the results to a file and "play" with the file using grep and awk. Everything works fine when I run the script from a command prompt. When I try to schedule the script via cron I get the following message:

/usr/local/util/amdsp_chk[5]: amdsp: Execute permission denied. Null message body; hope that's ok

I went to /opt/hparry/bin and changed the permissions for amdsp to be
"-r-xr-xr-x 1 root sys"
hoping that would solve my problem. It has not. My script has the permission of
"-rwxr-xr-x 1 root sys"
What am I missing?

Thanks
5 REPLIES 5
Kent Ostby
Honored Contributor
Solution

Re: Can't get amdsp to work from cron

Tom --

When I encounter cron problems, its generally a path issue.

Try setting the path in your cron script and/or putting in full path names for everything.

Best regards,

Kent M. Ostby
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
Steve Steel
Honored Contributor

Re: Can't get amdsp to work from cron

Hi

cron is a different environment.

Try

. /users/home/.profile

At the start of the script to run the profile you use from the command prompt


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Darren Prior
Honored Contributor

Re: Can't get amdsp to work from cron

Hi Tom,

Are you running the cronjob as root? It's likely that amdsp must be run as root, even if you've changed the file permissions.

regards,

Darren.
Calm down. It's only ones and zeros...
Franky_1
Respected Contributor

Re: Can't get amdsp to work from cron

Hi Tom,

could it be that you're running your cronjob under another account than root ?
If so , you're possibly running in that permission problem.
Just a thought ...

Franky
Don't worry be happy
Tom Gore
Regular Advisor

Re: Can't get amdsp to work from cron

Thanks to all.

Kent, your solution was the one that worked. When I specified the full path for amdsp in my script, it worked just fine.