<?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 Scripts is not working in cron in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/scripts-is-not-working-in-cron/m-p/4032858#M301722</link>
    <description>Hi experts ,&lt;BR /&gt;&lt;BR /&gt;I am running the bellow scripts in cron job its not working but when i ran in normal its working fine , can you pls help me to get resolve it.&lt;BR /&gt;&lt;BR /&gt;$ more chkorainst&lt;BR /&gt;#!/bin/ksh&lt;BR /&gt;# Check for PGGPDM_D1.world Oracle instance&lt;BR /&gt;#echo "Timestamp: `date` STATUS: `tnsping PGGPDM_D1.world | tail -1`" &amp;gt;&amp;gt; /opt/ma&lt;BR /&gt;trix/admin_scripts/chkorainst.output 2&amp;gt;&amp;amp;1&lt;BR /&gt;echo "Timestamp: `date` STATUS: " &amp;gt;&amp;gt; /opt/matrix/admin_scripts/chkorainst.output&lt;BR /&gt; 2&amp;gt;&amp;amp;1&lt;BR /&gt;exit&lt;BR /&gt;$ ./chkorainst&lt;BR /&gt;$ ls&lt;BR /&gt;chkorainst         filesystemmonitor  rbtmtr             rbtwas             rbtwas_old&lt;BR /&gt;chkorainst.output  finalwarn          rbtmtr.txt         rbtwas.txt         warn&lt;BR /&gt;$ more chkorainst.output&lt;BR /&gt;Timestamp: Thu Jul  5 10:05:35 EDT 2007 STATUS:&lt;BR /&gt;$  ./chkorainst&lt;BR /&gt;$ more chkorainst.output&lt;BR /&gt;Timestamp: Thu Jul  5 10:05:35 EDT 2007 STATUS:&lt;BR /&gt;Timestamp: Thu Jul  5 10:09:48 EDT 2007 STATUS:&lt;BR /&gt;</description>
    <pubDate>Thu, 05 Jul 2007 09:26:39 GMT</pubDate>
    <dc:creator>DhamoThulasi</dc:creator>
    <dc:date>2007-07-05T09:26:39Z</dc:date>
    <item>
      <title>Scripts is not working in cron</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripts-is-not-working-in-cron/m-p/4032858#M301722</link>
      <description>Hi experts ,&lt;BR /&gt;&lt;BR /&gt;I am running the bellow scripts in cron job its not working but when i ran in normal its working fine , can you pls help me to get resolve it.&lt;BR /&gt;&lt;BR /&gt;$ more chkorainst&lt;BR /&gt;#!/bin/ksh&lt;BR /&gt;# Check for PGGPDM_D1.world Oracle instance&lt;BR /&gt;#echo "Timestamp: `date` STATUS: `tnsping PGGPDM_D1.world | tail -1`" &amp;gt;&amp;gt; /opt/ma&lt;BR /&gt;trix/admin_scripts/chkorainst.output 2&amp;gt;&amp;amp;1&lt;BR /&gt;echo "Timestamp: `date` STATUS: " &amp;gt;&amp;gt; /opt/matrix/admin_scripts/chkorainst.output&lt;BR /&gt; 2&amp;gt;&amp;amp;1&lt;BR /&gt;exit&lt;BR /&gt;$ ./chkorainst&lt;BR /&gt;$ ls&lt;BR /&gt;chkorainst         filesystemmonitor  rbtmtr             rbtwas             rbtwas_old&lt;BR /&gt;chkorainst.output  finalwarn          rbtmtr.txt         rbtwas.txt         warn&lt;BR /&gt;$ more chkorainst.output&lt;BR /&gt;Timestamp: Thu Jul  5 10:05:35 EDT 2007 STATUS:&lt;BR /&gt;$  ./chkorainst&lt;BR /&gt;$ more chkorainst.output&lt;BR /&gt;Timestamp: Thu Jul  5 10:05:35 EDT 2007 STATUS:&lt;BR /&gt;Timestamp: Thu Jul  5 10:09:48 EDT 2007 STATUS:&lt;BR /&gt;</description>
      <pubDate>Thu, 05 Jul 2007 09:26:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripts-is-not-working-in-cron/m-p/4032858#M301722</guid>
      <dc:creator>DhamoThulasi</dc:creator>
      <dc:date>2007-07-05T09:26:39Z</dc:date>
    </item>
    <item>
      <title>Re: Scripts is not working in cron</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripts-is-not-working-in-cron/m-p/4032859#M301723</link>
      <description>Specify full path to any programs....like /usr/bin/echo, tnsping, etc...&lt;BR /&gt;&lt;BR /&gt;Most cases this is attributed to environment variables - like PATH....&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff</description>
      <pubDate>Thu, 05 Jul 2007 09:45:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripts-is-not-working-in-cron/m-p/4032859#M301723</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2007-07-05T09:45:37Z</dc:date>
    </item>
    <item>
      <title>Re: Scripts is not working in cron</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripts-is-not-working-in-cron/m-p/4032861#M301725</link>
      <description>Hi Thulasi&lt;BR /&gt;&lt;BR /&gt;The most common cause for this not being able to run from cron is bcoz of the PATH.&lt;BR /&gt;&lt;BR /&gt;edit the script and add the profiile, if user oracle is running this script, then&lt;BR /&gt;&lt;BR /&gt;. /home/oracle/.profile&lt;BR /&gt;&lt;BR /&gt;(absolute path of the user who is running the script )&lt;BR /&gt;&lt;BR /&gt;this will provide all the needed PATH and ENV variables.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 05 Jul 2007 09:56:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripts-is-not-working-in-cron/m-p/4032861#M301725</guid>
      <dc:creator>Basheer_2</dc:creator>
      <dc:date>2007-07-05T09:56:14Z</dc:date>
    </item>
    <item>
      <title>Re: Scripts is not working in cron</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripts-is-not-working-in-cron/m-p/4032862#M301726</link>
      <description>&amp;gt;Geoff: Specify full path to any programs like /usr/bin/echo&lt;BR /&gt;&lt;BR /&gt;Since echo is a shell builtin, that's not needed for it.&lt;BR /&gt;You are correct about the other causes.</description>
      <pubDate>Thu, 05 Jul 2007 10:03:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripts-is-not-working-in-cron/m-p/4032862#M301726</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-07-05T10:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: Scripts is not working in cron</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripts-is-not-working-in-cron/m-p/4032863#M301727</link>
      <description>&lt;BR /&gt;As Geoff indicates cron jobs start out with limited environment set up. Your first step shoudl proabbly be to run a .profile or such to set up $PATH, $ORACLE_SID and so on.&lt;BR /&gt;&lt;BR /&gt;There are many, many prior questions and answer about this in this very forum&lt;BR /&gt;To find those. Google: +cron +oracle +site:itrc.hp.com&lt;BR /&gt;For example:&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=31119" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=31119&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;If those answers fail to provide you with the help you need, then please be sure to re-reply with an exact description of why you think your job failed. Any particular error message? Can you cron a write with 'echo hello world'? Can you con a script to show the environement setup?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this helps some,&lt;BR /&gt;Hein van den Heuvel (at gmail dot com)&lt;BR /&gt;HvdH Performance Consulting&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 05 Jul 2007 10:06:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripts-is-not-working-in-cron/m-p/4032863#M301727</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2007-07-05T10:06:37Z</dc:date>
    </item>
  </channel>
</rss>

