<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: crontab in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/crontab/m-p/2421604#M866580</link>
    <description>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.&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;So /etc/profile and .profile need to have tests for an interactive tty before running these commands, something like:&lt;BR /&gt;&lt;BR /&gt;if tty -s&lt;BR /&gt;then&lt;BR /&gt;eval (ttytype -s)&lt;BR /&gt;tabs&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;</description>
    <pubDate>Thu, 28 Jun 2001 16:20:41 GMT</pubDate>
    <dc:creator>Bill Hassell</dc:creator>
    <dc:date>2001-06-28T16:20:41Z</dc:date>
    <item>
      <title>crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/crontab/m-p/2421595#M866571</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;We useing HP9000 V-class system HP-UX 11.x and hosting oracle8 release 11.&lt;BR /&gt;&lt;BR /&gt;I am using a script with user x and schedule it using crontab to run over &lt;BR /&gt;night, but it failed the error message which i am getting is as follows : - &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;oracle8/oracle8/stoporacle8: MANPATH: Parameter not set.   &lt;BR /&gt;logout                                                     &lt;BR /&gt;*************************************************          &lt;BR /&gt;Cron: The previous message is the standard output          &lt;BR /&gt;      and standard error of one of your crontab commands:  &lt;BR /&gt;                                                        &lt;BR /&gt;/oracle8/oracle8/stoporacle8                              &lt;BR /&gt;Please help if you face such problem.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sat, 15 Apr 2000 05:38:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/crontab/m-p/2421595#M866571</guid>
      <dc:creator>Ahmed Ibrahim_3</dc:creator>
      <dc:date>2000-04-15T05:38:28Z</dc:date>
    </item>
    <item>
      <title>Re: crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/crontab/m-p/2421596#M866572</link>
      <description>In your script, are you setting ALL the environment variables correctly?&lt;BR /&gt;It looks like the script is looking for the MANPATH variable, and this is not &lt;BR /&gt;set.&lt;BR /&gt;I would suggest you add this in to the script.</description>
      <pubDate>Sun, 16 Apr 2000 12:32:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/crontab/m-p/2421596#M866572</guid>
      <dc:creator>Melvyn Burnard_1</dc:creator>
      <dc:date>2000-04-16T12:32:55Z</dc:date>
    </item>
    <item>
      <title>Re: crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/crontab/m-p/2421597#M866573</link>
      <description>Hi Ahmed,&lt;BR /&gt;&lt;BR /&gt;You have to include the PATH in your oracle and root .profiles and export the PATH.&lt;BR /&gt;&lt;BR /&gt;Cheers!&lt;BR /&gt;</description>
      <pubDate>Sat, 20 May 2000 12:14:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/crontab/m-p/2421597#M866573</guid>
      <dc:creator>CHRIS_ANORUO</dc:creator>
      <dc:date>2000-05-20T12:14:41Z</dc:date>
    </item>
    <item>
      <title>Re: crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/crontab/m-p/2421598#M866574</link>
      <description>Ahmed,&lt;BR /&gt;&lt;BR /&gt;First of all, the Cron tab error indicates that your Environment is not being setup properly for the Cron Job.&lt;BR /&gt;&lt;BR /&gt;You can fix this one of two ways:&lt;BR /&gt;&lt;BR /&gt;1. inside the script, source your evironment manually (i.e.&lt;BR /&gt;. .profile)&lt;BR /&gt;&lt;BR /&gt;2. Execute the application from Root's Cron with the Following command:&lt;BR /&gt;&lt;BR /&gt;/bin/su - {user x} -c "Script Name and all arguments"&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;Hope that helps.&lt;BR /&gt;</description>
      <pubDate>Mon, 22 May 2000 18:21:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/crontab/m-p/2421598#M866574</guid>
      <dc:creator>Albert E. Whale, CISSP</dc:creator>
      <dc:date>2000-05-22T18:21:26Z</dc:date>
    </item>
    <item>
      <title>Re: crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/crontab/m-p/2421599#M866575</link>
      <description>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 friends...is your last last name Rashard (or rachard)?&lt;BR /&gt;</description>
      <pubDate>Fri, 26 May 2000 18:38:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/crontab/m-p/2421599#M866575</guid>
      <dc:creator>David Seijo</dc:creator>
      <dc:date>2000-05-26T18:38:21Z</dc:date>
    </item>
    <item>
      <title>Re: crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/crontab/m-p/2421600#M866576</link>
      <description>- root user login&lt;BR /&gt;   # crontab -l &amp;gt; crontest&lt;BR /&gt;   # vi crontest&lt;BR /&gt;   0 23 * * * /usr/bin/su - root -c "/oracle8/oracle8/stoporacle8"&lt;BR /&gt;   # crontab crontest&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 22 Sep 2000 01:58:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/crontab/m-p/2421600#M866576</guid>
      <dc:creator>glovecar</dc:creator>
      <dc:date>2000-09-22T01:58:47Z</dc:date>
    </item>
    <item>
      <title>Re: crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/crontab/m-p/2421601#M866577</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;#vi /oracle8/oracle8/stoporacle8.sh&lt;BR /&gt;;ORACLE ORACLE STOP&lt;BR /&gt;su - oracle8 &amp;lt;</description>
      <pubDate>Fri, 22 Sep 2000 08:49:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/crontab/m-p/2421601#M866577</guid>
      <dc:creator>허용제_1</dc:creator>
      <dc:date>2000-09-22T08:49:06Z</dc:date>
    </item>
    <item>
      <title>Re: crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/crontab/m-p/2421602#M866578</link>
      <description>My cron jobs are failing for the same reason too.&lt;BR /&gt;"MANPATH not set". This happens even when I source&lt;BR /&gt;my .profile. The problem is fixed when I added MANPATH&lt;BR /&gt;to my .profile. Any clues as to why the cron is sensitive&lt;BR /&gt;to MANPATH? &lt;BR /&gt;&lt;BR /&gt;OS: hpux 11 64 bit.</description>
      <pubDate>Thu, 28 Jun 2001 14:28:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/crontab/m-p/2421602#M866578</guid>
      <dc:creator>Srini_2</dc:creator>
      <dc:date>2001-06-28T14:28:01Z</dc:date>
    </item>
    <item>
      <title>Re: crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/crontab/m-p/2421603#M866579</link>
      <description>Hi there.&lt;BR /&gt;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 :&lt;BR /&gt;setup user oracle ( group dba )&lt;BR /&gt;Use this user for shutdown and startup.&lt;BR /&gt;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.&lt;BR /&gt;Sample line in cron :&lt;BR /&gt;&lt;BR /&gt;su - oracle -c 'dbshut_all'&lt;BR /&gt;&lt;BR /&gt;su - oracle -c 'dbstart_all'&lt;BR /&gt;&lt;BR /&gt;If you need samples of these scripts, pls let me know and email me at Alexander_Ermes@web.de.&lt;BR /&gt;Rgds&lt;BR /&gt;Alexander M. Ermes&lt;BR /&gt;</description>
      <pubDate>Thu, 28 Jun 2001 15:56:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/crontab/m-p/2421603#M866579</guid>
      <dc:creator>Alexander M. Ermes</dc:creator>
      <dc:date>2001-06-28T15:56:53Z</dc:date>
    </item>
    <item>
      <title>Re: crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/crontab/m-p/2421604#M866580</link>
      <description>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.&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;So /etc/profile and .profile need to have tests for an interactive tty before running these commands, something like:&lt;BR /&gt;&lt;BR /&gt;if tty -s&lt;BR /&gt;then&lt;BR /&gt;eval (ttytype -s)&lt;BR /&gt;tabs&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;</description>
      <pubDate>Thu, 28 Jun 2001 16:20:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/crontab/m-p/2421604#M866580</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2001-06-28T16:20:41Z</dc:date>
    </item>
  </channel>
</rss>

