<?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: Yet another scripting problem... in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/yet-another-scripting-problem/m-p/2769646#M74328</link>
    <description>I have tried 'set -x' and echoing specific environment variables but none ever appear in the log. Only the error in my original message.</description>
    <pubDate>Mon, 22 Jul 2002 19:30:02 GMT</pubDate>
    <dc:creator>Don Spare</dc:creator>
    <dc:date>2002-07-22T19:30:02Z</dc:date>
    <item>
      <title>Yet another scripting problem...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/yet-another-scripting-problem/m-p/2769640#M74322</link>
      <description>I have written a script that I use to collect space statistics from both of my servers and all Oracle DBs on those servers. When I login as user 'oracle' and invoke it from the command line it works perfectly. But when I invoke it via cron all I get is an error that says: 'sh: Mail: Execute permission denied.'.   I have no idea where this is coming from as I am not issuing any statements like that and mailx is called from inside another script that is the last line of this one. I've looked at environment setup and can see no difference from many other scripts that are similarly designed. Maybe I'm just too close to the problem. Can anyone help?</description>
      <pubDate>Mon, 22 Jul 2002 19:16:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/yet-another-scripting-problem/m-p/2769640#M74322</guid>
      <dc:creator>Don Spare</dc:creator>
      <dc:date>2002-07-22T19:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: Yet another scripting problem...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/yet-another-scripting-problem/m-p/2769641#M74323</link>
      <description>Look at the permissions (mode bits, owership) of the called script which I believe that it was not set appropriately for the cron user.&lt;BR /&gt;&lt;BR /&gt;Hai</description>
      <pubDate>Mon, 22 Jul 2002 19:20:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/yet-another-scripting-problem/m-p/2769641#M74323</guid>
      <dc:creator>Hai Nguyen_1</dc:creator>
      <dc:date>2002-07-22T19:20:53Z</dc:date>
    </item>
    <item>
      <title>Re: Yet another scripting problem...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/yet-another-scripting-problem/m-p/2769642#M74324</link>
      <description>See if the 6th field in your crontab is a '*'.</description>
      <pubDate>Mon, 22 Jul 2002 19:23:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/yet-another-scripting-problem/m-p/2769642#M74324</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-07-22T19:23:02Z</dc:date>
    </item>
    <item>
      <title>Re: Yet another scripting problem...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/yet-another-scripting-problem/m-p/2769643#M74325</link>
      <description>That's not it. It is set rwxr-xr-x. And it doesn't even get to the last script. The error message I listed in my original request is the only output.</description>
      <pubDate>Mon, 22 Jul 2002 19:23:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/yet-another-scripting-problem/m-p/2769643#M74325</guid>
      <dc:creator>Don Spare</dc:creator>
      <dc:date>2002-07-22T19:23:06Z</dc:date>
    </item>
    <item>
      <title>Re: Yet another scripting problem...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/yet-another-scripting-problem/m-p/2769644#M74326</link>
      <description>The crontab entry is as follows:  &lt;BR /&gt;&lt;BR /&gt;18 16 * * * * /dba/dba/maint/collect_space_usage_data.sh  &amp;gt; /dba/dba/log/dwdev001/collect_space_usage_data.log 2&amp;gt;&amp;amp;1&lt;BR /&gt;&lt;BR /&gt;(I've been playing with the times to make it run)</description>
      <pubDate>Mon, 22 Jul 2002 19:25:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/yet-another-scripting-problem/m-p/2769644#M74326</guid>
      <dc:creator>Don Spare</dc:creator>
      <dc:date>2002-07-22T19:25:03Z</dc:date>
    </item>
    <item>
      <title>Re: Yet another scripting problem...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/yet-another-scripting-problem/m-p/2769645#M74327</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;'cron' provides a limited environment.  Usually, at the least, you need to either specify absolute paths and/or set the PATH variable to that which your cron script needs.  Remember too, that other environmental variables that you normally set when you login (using your profile) are not set in the unembellished cron environment.&lt;BR /&gt;&lt;BR /&gt;You might place 'set -x' and 'set -u' in your script when you run it from cron to trace and trap unset variables.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 22 Jul 2002 19:27:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/yet-another-scripting-problem/m-p/2769645#M74327</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2002-07-22T19:27:13Z</dc:date>
    </item>
    <item>
      <title>Re: Yet another scripting problem...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/yet-another-scripting-problem/m-p/2769646#M74328</link>
      <description>I have tried 'set -x' and echoing specific environment variables but none ever appear in the log. Only the error in my original message.</description>
      <pubDate>Mon, 22 Jul 2002 19:30:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/yet-another-scripting-problem/m-p/2769646#M74328</guid>
      <dc:creator>Don Spare</dc:creator>
      <dc:date>2002-07-22T19:30:02Z</dc:date>
    </item>
    <item>
      <title>Re: Yet another scripting problem...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/yet-another-scripting-problem/m-p/2769647#M74329</link>
      <description>Clay is correct .. your 6th field in your crontab file entry is an "*". The format should be .. (1st-&amp;gt;6th)&lt;BR /&gt;&lt;BR /&gt;minute  hour  monthday  month  weekday  command&lt;BR /&gt;&lt;BR /&gt;and your cron entries ..&lt;BR /&gt;&lt;BR /&gt;18 16 * * * * &lt;COMMAND&gt;&lt;BR /&gt;&lt;BR /&gt;has an additional "*". That is why you're getting this weird "sh:Mail.." error because root is trying to execute "Mail" command from root (/).&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/COMMAND&gt;</description>
      <pubDate>Mon, 22 Jul 2002 19:33:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/yet-another-scripting-problem/m-p/2769647#M74329</guid>
      <dc:creator>S.K. Chan</dc:creator>
      <dc:date>2002-07-22T19:33:53Z</dc:date>
    </item>
    <item>
      <title>Re: Yet another scripting problem...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/yet-another-scripting-problem/m-p/2769648#M74330</link>
      <description>.. because the directory "Mail" is the first that appears (in order) in /.</description>
      <pubDate>Mon, 22 Jul 2002 19:37:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/yet-another-scripting-problem/m-p/2769648#M74330</guid>
      <dc:creator>S.K. Chan</dc:creator>
      <dc:date>2002-07-22T19:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: Yet another scripting problem...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/yet-another-scripting-problem/m-p/2769649#M74331</link>
      <description>The 6th field '*' was the problem. All is well and points have been assigned.&lt;BR /&gt;&lt;BR /&gt;Thank you all very much.</description>
      <pubDate>Mon, 22 Jul 2002 19:44:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/yet-another-scripting-problem/m-p/2769649#M74331</guid>
      <dc:creator>Don Spare</dc:creator>
      <dc:date>2002-07-22T19:44:34Z</dc:date>
    </item>
  </channel>
</rss>

