<?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: rc=1 in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/rc-1/m-p/3132030#M153152</link>
    <description>where are you writing date.log too? It is very important in cron to use absolute paths at all times in your scripts.</description>
    <pubDate>Sun, 30 Nov 2003 22:19:05 GMT</pubDate>
    <dc:creator>Kevin Wright</dc:creator>
    <dc:date>2003-11-30T22:19:05Z</dc:date>
    <item>
      <title>rc=1</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rc-1/m-p/3132024#M153146</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I have a rp8400/HP-UX 11i. All the cronjobs running under oracle user is failing with the error in /var/adm/cron/log as rc=1.&lt;BR /&gt;&lt;BR /&gt;I have restarted the server and prior to restart the cronjob were running w/o any error.&lt;BR /&gt;&lt;BR /&gt;I have even created a test cronjob but it fails too.&lt;BR /&gt;$ crontab -l&lt;BR /&gt;&lt;BR /&gt;05,10,15,20,25,30 * * * * date &amp;gt; date.log&lt;BR /&gt;&lt;BR /&gt;/var/adm/cron/log&lt;BR /&gt;&lt;BR /&gt; CMD: date &amp;gt; date.log&lt;BR /&gt;&amp;gt;  oracle 26954 c Mon Dec  1 10:25:00 SST 2003&lt;BR /&gt;&amp;lt;  oracle 26954 c Mon Dec  1 10:25:00 SST 2003 rc=1&lt;BR /&gt;&lt;BR /&gt;The same test cronjob is working for another users like root.&lt;BR /&gt;&lt;BR /&gt;What has gone wrong?&lt;BR /&gt;&lt;BR /&gt;Thanks,</description>
      <pubDate>Sun, 30 Nov 2003 21:34:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rc-1/m-p/3132024#M153146</guid>
      <dc:creator>Sanjiv Sharma_1</dc:creator>
      <dc:date>2003-11-30T21:34:34Z</dc:date>
    </item>
    <item>
      <title>Re: rc=1</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rc-1/m-p/3132025#M153147</link>
      <description>Obvious question?&lt;BR /&gt;&lt;BR /&gt;Does the user in question have execute permissions on the file /usr/bin/date&lt;BR /&gt;&lt;BR /&gt;I think you would get a return code(rc) of 1 if you tried to execute it and had no permissions.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Sun, 30 Nov 2003 21:37:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rc-1/m-p/3132025#M153147</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2003-11-30T21:37:10Z</dc:date>
    </item>
    <item>
      <title>Re: rc=1</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rc-1/m-p/3132026#M153148</link>
      <description>cron is really stupid, try the full path of the date program:&lt;BR /&gt;&lt;BR /&gt;05,10,15,20,25,30 * * * * /usr/bin/date &amp;gt; date.log&lt;BR /&gt;&lt;BR /&gt;Has the 'oracle' user have an entry in the cron.allow file?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sun, 30 Nov 2003 21:39:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rc-1/m-p/3132026#M153148</guid>
      <dc:creator>Michael Tully</dc:creator>
      <dc:date>2003-11-30T21:39:50Z</dc:date>
    </item>
    <item>
      <title>Re: rc=1</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rc-1/m-p/3132027#M153149</link>
      <description>Yes the oracle user has execute permission on the date command.&lt;BR /&gt;/usr/bin&amp;gt; ll date&lt;BR /&gt;-r-xr-xr-x   1 bin        bin          16384 Nov 14  2000 date&lt;BR /&gt;&lt;BR /&gt;Also I am able to execute the date command crom command line.&lt;BR /&gt;&lt;BR /&gt;Thanks,</description>
      <pubDate>Sun, 30 Nov 2003 21:41:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rc-1/m-p/3132027#M153149</guid>
      <dc:creator>Sanjiv Sharma_1</dc:creator>
      <dc:date>2003-11-30T21:41:20Z</dc:date>
    </item>
    <item>
      <title>Re: rc=1</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rc-1/m-p/3132028#M153150</link>
      <description>I have given the full path now:&lt;BR /&gt;&lt;BR /&gt;05,10,15,20,25,30 * * * * /usr/bin/date &amp;gt; date.log&lt;BR /&gt;&lt;BR /&gt;But it still fails with the same error.&lt;BR /&gt;&lt;BR /&gt;'oracle' user have an entry in the cron.allow file.&lt;BR /&gt;&lt;BR /&gt;Thanks,</description>
      <pubDate>Sun, 30 Nov 2003 21:46:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rc-1/m-p/3132028#M153150</guid>
      <dc:creator>Sanjiv Sharma_1</dc:creator>
      <dc:date>2003-11-30T21:46:15Z</dc:date>
    </item>
    <item>
      <title>Re: rc=1</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rc-1/m-p/3132029#M153151</link>
      <description>Hi Sanjiv&lt;BR /&gt;&lt;BR /&gt;Try to explicitly set the full path for date.log &amp;amp; write it to /tmp.&lt;BR /&gt;05,10,15,20,25,30 * * * * /usr/bin/date &amp;gt; /tmp/date.log&lt;BR /&gt;&lt;BR /&gt;cron will try to write the date.log file to the users home directory.  Are the permissions correct on this directory (ie the Oracle Home).&lt;BR /&gt;&lt;BR /&gt;Cheers&lt;BR /&gt;Con&lt;BR /&gt;</description>
      <pubDate>Sun, 30 Nov 2003 22:11:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rc-1/m-p/3132029#M153151</guid>
      <dc:creator>Con O'Kelly</dc:creator>
      <dc:date>2003-11-30T22:11:42Z</dc:date>
    </item>
    <item>
      <title>Re: rc=1</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rc-1/m-p/3132030#M153152</link>
      <description>where are you writing date.log too? It is very important in cron to use absolute paths at all times in your scripts.</description>
      <pubDate>Sun, 30 Nov 2003 22:19:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rc-1/m-p/3132030#M153152</guid>
      <dc:creator>Kevin Wright</dc:creator>
      <dc:date>2003-11-30T22:19:05Z</dc:date>
    </item>
    <item>
      <title>Re: rc=1</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rc-1/m-p/3132031#M153153</link>
      <description>The rc=1 in the cron logis the return code. rc=0 is OK and rc=non-zerois a problem. Unfortunately, there isn't enough information on what the non-zero value is reporting. root generally works for most everything so when an ordinary user fails, the issue is usually permissions. But avoid changing everything to 777 permissions! Instead, look at the location for date.log. Since date.log is not a fullpath, it's location is *NOT* the user's $HOME. $PATH and most all the other env variables that are set with a login will not be set as cron does not login--it simply runs on behalf of the user. My guess is that date.log is going to be stored in / and that is one of the many directories un which ordinary users can never create files or directories. Specify a fullpath to date.log, perhaps /var/tmp.</description>
      <pubDate>Sun, 30 Nov 2003 23:02:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rc-1/m-p/3132031#M153153</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2003-11-30T23:02:42Z</dc:date>
    </item>
    <item>
      <title>Re: rc=1</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rc-1/m-p/3132032#M153154</link>
      <description>Hi (again)&lt;BR /&gt;&lt;BR /&gt;Unless I'm reading it wrong the crontab man page states that cron supplies a default environment (albeit a very limited one) for every shell which *includes* the users HOME directory.  &lt;BR /&gt;&lt;BR /&gt;It also states that the command is invoked from the users home directory, which would imply that the if no path is given then date.log will be written to the users home directory (ie the directory where it was invoked) rather than the / fileystem. &lt;BR /&gt;&lt;BR /&gt;My guess is that the permissions have gotten messed up on the Oracle Home.  Possibly all your oracle cron jobs output to Oracle Home??&lt;BR /&gt;&lt;BR /&gt;Cheers&lt;BR /&gt;Con</description>
      <pubDate>Sun, 30 Nov 2003 23:27:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rc-1/m-p/3132032#M153154</guid>
      <dc:creator>Con O'Kelly</dc:creator>
      <dc:date>2003-11-30T23:27:49Z</dc:date>
    </item>
    <item>
      <title>Re: rc=1</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rc-1/m-p/3132033#M153155</link>
      <description>Con is correct. I was thinking about $PATH and mentioned $HOME without checking. Since most of my cron jobs never use $HOME, I just assume that files without a leading / are going to the 'wrong' location.</description>
      <pubDate>Sun, 30 Nov 2003 23:42:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rc-1/m-p/3132033#M153155</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2003-11-30T23:42:05Z</dc:date>
    </item>
    <item>
      <title>Re: rc=1</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rc-1/m-p/3132034#M153156</link>
      <description>Hi All,&lt;BR /&gt;&lt;BR /&gt;I have changed the cron to &lt;BR /&gt;05,10,15,20,25,30 * * * * /usr/bin/date &amp;gt; /tmp/date.log&lt;BR /&gt;&lt;BR /&gt;But still the same problem.&lt;BR /&gt;&lt;BR /&gt;Thanks,</description>
      <pubDate>Mon, 01 Dec 2003 00:19:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rc-1/m-p/3132034#M153156</guid>
      <dc:creator>Sanjiv Sharma_1</dc:creator>
      <dc:date>2003-12-01T00:19:17Z</dc:date>
    </item>
    <item>
      <title>Re: rc=1</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rc-1/m-p/3132035#M153157</link>
      <description>Hi &lt;BR /&gt;&lt;BR /&gt;Seems very strange.&lt;BR /&gt;Check if other users apart from root can successfully execute cron jobs?  &lt;BR /&gt;&lt;BR /&gt;Maybe post output of the following commands:&lt;BR /&gt;# pwget -n oracle&lt;BR /&gt;$ ll -d $HOME (logged in as oracle user)&lt;BR /&gt;# ll /tmp/date.log&lt;BR /&gt;# ll /var/spool/cron/crontabs/oracle&lt;BR /&gt;&lt;BR /&gt;Cheers&lt;BR /&gt;Con&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 01 Dec 2003 00:53:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rc-1/m-p/3132035#M153157</guid>
      <dc:creator>Con O'Kelly</dc:creator>
      <dc:date>2003-12-01T00:53:17Z</dc:date>
    </item>
    <item>
      <title>Re: rc=1</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rc-1/m-p/3132036#M153158</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;One other thing, check your oracle mail for messages from cron.&lt;BR /&gt;cron normally generates a mail for jobs that fail. The mail message often gives more detail than the cron log on the reason for the failure.&lt;BR /&gt;&lt;BR /&gt;Cheers&lt;BR /&gt;Con</description>
      <pubDate>Mon, 01 Dec 2003 01:03:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rc-1/m-p/3132036#M153158</guid>
      <dc:creator>Con O'Kelly</dc:creator>
      <dc:date>2003-12-01T01:03:45Z</dc:date>
    </item>
  </channel>
</rss>

