Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
Showing results for 
Search instead for 
Did you mean: 


Ahmed Ibrahim_3
Occasional Advisor



We useing HP9000 V-class system HP-UX 11.x and hosting oracle8 release 11.

I am using a script with user x and schedule it using crontab to run over
night, but it failed the error message which i am getting is as follows : -

oracle8/oracle8/stoporacle8: MANPATH: Parameter not set.
Cron: The previous message is the standard output
and standard error of one of your crontab commands:

Please help if you face such problem.


Melvyn Burnard_1
Regular Advisor

Re: crontab

In your script, are you setting ALL the environment variables correctly?
It looks like the script is looking for the MANPATH variable, and this is not
I would suggest you add this in to the script.
Honored Contributor

Re: crontab

Hi Ahmed,

You have to include the PATH in your oracle and root .profiles and export the PATH.

When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
Albert E. Whale, CISSP
Honored Contributor

Re: crontab


First of all, the Cron tab error indicates that your Environment is not being setup properly for the Cron Job.

You can fix this one of two ways:

1. inside the script, source your evironment manually (i.e.
. .profile)

2. Execute the application from Root's Cron with the Following command:

/bin/su - {user x} -c "Script Name and all arguments"

The later will always work, however it does not allow the User to understand that the problem is that they need to establish the environment variable which they have when they are an interactive user.

Hope that helps.
Sr. Systems Consultant @ ABS Computer Technology, Inc. &
David Seijo
Occasional Visitor

Re: crontab

Hey ...I know you posted this question long time ago..but just in case you come back one day...for some reason you remember me one of my your last last name Rashard (or rachard)?
Don't have one right now....
Occasional Advisor

Re: crontab

- root user login
# crontab -l > crontest
# vi crontest
0 23 * * * /usr/bin/su - root -c "/oracle8/oracle8/stoporacle8"
# crontab crontest

Occasional Visitor

Re: crontab


#vi /oracle8/oracle8/
su - oracle8 <
Occasional Visitor

Re: crontab

My cron jobs are failing for the same reason too.
"MANPATH not set". This happens even when I source
my .profile. The problem is fixed when I added MANPATH
to my .profile. Any clues as to why the cron is sensitive

OS: hpux 11 64 bit.
Alexander M. Ermes
Honored Contributor

Re: crontab

Hi there.
Usually you have a file called oraenv. In this file all variables for Oracle should be set. This script will also be run in the .profile of the user oracle. If you want to shutdown and startup Oracle with cron, try this way :
setup user oracle ( group dba )
Use this user for shutdown and startup.
There are standard scripts from Oracle for startup and shutdown ( dbstart / dbshut ). You should read all lines in /etc/oratab and do a shutdown and startup with the Oracle SIDs as parameters.
Sample line in cron :

su - oracle -c 'dbshut_all'

su - oracle -c 'dbstart_all'

If you need samples of these scripts, pls let me know and email me at
Alexander M. Ermes
.. and all these memories are going to vanish like tears in the rain! final words from Rutger Hauer in "Blade Runner"
Bill Hassell
Honored Contributor

Re: crontab

One of the overlooked features of cron is that is has little resemblance to a normal login. The crontab man page mentions that there is no login and virtually no environment. That means that /etc/profile and .profile are not executed when the job runs.

Some cron jobs will use the su - oracle method to run on Oracle's behalf and this will login but since cron has no terminal, tty-only commands like ttytype and tset and tabs will fail with "not a typewriter" errors.

So /etc/profile and .profile need to have tests for an interactive tty before running these commands, something like:

if tty -s
eval (ttytype -s)

Another thing to compare: Login as the oacle user and type the commands: set and env. Then create a cronjob similar to the Oracle start/stop scripts which add set and env at the beginning so you can see the differences.

Bill Hassell, sysadmin