<?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: Cron problem in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-problem/m-p/3203523#M792596</link>
    <description>Joe,&lt;BR /&gt;&lt;BR /&gt;Are you getting any errors, either in the cron log or emailed back to your submitting user?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
    <pubDate>Thu, 26 Feb 2004 15:01:55 GMT</pubDate>
    <dc:creator>Pete Randall</dc:creator>
    <dc:date>2004-02-26T15:01:55Z</dc:date>
    <item>
      <title>Cron problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-problem/m-p/3203517#M792590</link>
      <description>I have a script that will synch, and fracture some clones on and EMC CX600. If I run this script interactively as root from the command line, it runs flawlessly. If I run it from root's cron, it fails miserably. Does cron andle scripts any differently than the command line?</description>
      <pubDate>Thu, 26 Feb 2004 14:42:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-problem/m-p/3203517#M792590</guid>
      <dc:creator>Joe Short</dc:creator>
      <dc:date>2004-02-26T14:42:07Z</dc:date>
    </item>
    <item>
      <title>Re: Cron problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-problem/m-p/3203518#M792591</link>
      <description>First, cron's environment is intentionally very sparse, including PATH. You need to set and export and needed env vars early in your script. Secondly, you are not connected to a controlling terminal (ie stdout,stdin, and stderr are not associated with a TTY device). If your routines depend upon any interaction or call any routines that do like stty, tabs, tput, tset .. then the routine can fail.&lt;BR /&gt;&lt;BR /&gt;I'm betting on PATH and other environment variables needing to be explicitly set.&lt;BR /&gt;</description>
      <pubDate>Thu, 26 Feb 2004 14:47:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-problem/m-p/3203518#M792591</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2004-02-26T14:47:45Z</dc:date>
    </item>
    <item>
      <title>Re: Cron problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-problem/m-p/3203519#M792592</link>
      <description>for the most part yes, but one thing that always gets us is you have to remember that when things run from cron, you dont have any environment variables set....so pathing can be an issue and so on....if you type "env" from command line, and run "env" from cron you will notice they are prob really different...that may be what is causing your script to die</description>
      <pubDate>Thu, 26 Feb 2004 14:48:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-problem/m-p/3203519#M792592</guid>
      <dc:creator>Ken Penland_1</dc:creator>
      <dc:date>2004-02-26T14:48:12Z</dc:date>
    </item>
    <item>
      <title>Re: Cron problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-problem/m-p/3203520#M792593</link>
      <description>Joe,&lt;BR /&gt;&lt;BR /&gt;The difference is the minimal environment provide by cron, in particular the PATH but also other ENV variables.  Either use full path names for all commands in your script or source in a profile at the beginning of the script.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Thu, 26 Feb 2004 14:48:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-problem/m-p/3203520#M792593</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2004-02-26T14:48:37Z</dc:date>
    </item>
    <item>
      <title>Re: Cron problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-problem/m-p/3203521#M792594</link>
      <description>I caught that one, not only am I setting up the env, I am also running command with the complete explicit path in them. &lt;BR /&gt;Still no luck.</description>
      <pubDate>Thu, 26 Feb 2004 14:55:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-problem/m-p/3203521#M792594</guid>
      <dc:creator>Joe Short</dc:creator>
      <dc:date>2004-02-26T14:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: Cron problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-problem/m-p/3203522#M792595</link>
      <description>hrm, the only thing I can think of besides env is possibly the shell that it is running in?  perhaps your shell is different than what cron uses and it is not specified in your script?</description>
      <pubDate>Thu, 26 Feb 2004 14:59:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-problem/m-p/3203522#M792595</guid>
      <dc:creator>Ken Penland_1</dc:creator>
      <dc:date>2004-02-26T14:59:28Z</dc:date>
    </item>
    <item>
      <title>Re: Cron problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-problem/m-p/3203523#M792596</link>
      <description>Joe,&lt;BR /&gt;&lt;BR /&gt;Are you getting any errors, either in the cron log or emailed back to your submitting user?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Thu, 26 Feb 2004 15:01:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-problem/m-p/3203523#M792596</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2004-02-26T15:01:55Z</dc:date>
    </item>
    <item>
      <title>Re: Cron problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-problem/m-p/3203524#M792597</link>
      <description>No, no errors, it was looking like a timing issue, so I moved my script's run time around. I expected this thread to be a long shot, but it was worth a try. &lt;BR /&gt;I'm going to redesign the script, and see if that brings any better results.</description>
      <pubDate>Thu, 26 Feb 2004 15:04:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-problem/m-p/3203524#M792597</guid>
      <dc:creator>Joe Short</dc:creator>
      <dc:date>2004-02-26T15:04:06Z</dc:date>
    </item>
    <item>
      <title>Re: Cron problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-problem/m-p/3203525#M792598</link>
      <description>Place "set -x" (without the quotes) at the top of your cron script and run it again.  See if the output indicates why it is failing.</description>
      <pubDate>Thu, 26 Feb 2004 15:41:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-problem/m-p/3203525#M792598</guid>
      <dc:creator>Cheryl Griffin</dc:creator>
      <dc:date>2004-02-26T15:41:49Z</dc:date>
    </item>
    <item>
      <title>Re: Cron problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-problem/m-p/3203526#M792599</link>
      <description>Cheryl, will that set x work when the script is run from cron?</description>
      <pubDate>Thu, 26 Feb 2004 15:43:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-problem/m-p/3203526#M792599</guid>
      <dc:creator>Joe Short</dc:creator>
      <dc:date>2004-02-26T15:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: Cron problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-problem/m-p/3203527#M792600</link>
      <description>I believe it will work.&lt;BR /&gt;&lt;BR /&gt;It's not a command, its built into the shell.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Thu, 26 Feb 2004 15:45:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-problem/m-p/3203527#M792600</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2004-02-26T15:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: Cron problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-problem/m-p/3203528#M792601</link>
      <description>Excellent, I have my script sscheduled to run again tonight. I'll put that into it right under the shell specification.&lt;BR /&gt;Thanks.</description>
      <pubDate>Thu, 26 Feb 2004 15:47:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-problem/m-p/3203528#M792601</guid>
      <dc:creator>Joe Short</dc:creator>
      <dc:date>2004-02-26T15:47:25Z</dc:date>
    </item>
    <item>
      <title>Re: Cron problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-problem/m-p/3203529#M792602</link>
      <description>&amp;gt;&amp;gt;Cheryl, will that set x work when the script is run from cron? &amp;gt;&amp;gt;&lt;BR /&gt;&lt;BR /&gt;Yes.  This is how we troubleshoot scripts, cron scripts. &lt;BR /&gt;&lt;BR /&gt;99% of the time when a script runs from command line and it fails in cron, the environment is not right.  When you login, your .profile, /etc/profile, etc. is sourced which sets up your environment.  With cron you're in a pseudo environment which means that anything that needs to be set, must be done so in the script.&lt;BR /&gt;&lt;BR /&gt;The set -x should help you determine what's not being set.</description>
      <pubDate>Thu, 26 Feb 2004 15:53:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-problem/m-p/3203529#M792602</guid>
      <dc:creator>Cheryl Griffin</dc:creator>
      <dc:date>2004-02-26T15:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: Cron problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-problem/m-p/3203530#M792603</link>
      <description>Thanks, I'll give it a try tonight.</description>
      <pubDate>Thu, 26 Feb 2004 15:55:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-problem/m-p/3203530#M792603</guid>
      <dc:creator>Joe Short</dc:creator>
      <dc:date>2004-02-26T15:55:42Z</dc:date>
    </item>
  </channel>
</rss>

