<?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 Job Executing Script but Command not Working in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/cron-job-executing-script-but-command-not-working/m-p/4998000#M97978</link>
    <description>Add this line very near the top of your script:&lt;BR /&gt;&lt;BR /&gt;export PATH=${PATH}:/opt/omni/bin:/opt/omni/lbin&lt;BR /&gt;&lt;BR /&gt;Cron's environment (including PATH) is intentionally very sparse.&lt;BR /&gt;</description>
    <pubDate>Thu, 17 Aug 2006 11:10:26 GMT</pubDate>
    <dc:creator>A. Clay Stephenson</dc:creator>
    <dc:date>2006-08-17T11:10:26Z</dc:date>
    <item>
      <title>Cron Job Executing Script but Command not Working</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-job-executing-script-but-command-not-working/m-p/4997996#M97974</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I scheduled a cron job through SAM but it is not working.&lt;BR /&gt;&lt;BR /&gt;The contents of the script are as attached. &lt;BR /&gt;&lt;BR /&gt;Looking at the cron log it is executing the script and some features of it are working apart from the execution of the omnimm commands and I cannot understand why? The deletion of log files and emailing contents of new log files is working okay but the omnimm -repository_update does not seem to be hitting data protector at all. If I execute manually it is fine.&lt;BR /&gt;&lt;BR /&gt;Im sorry but my HPUX knowledge is only basic.&lt;BR /&gt;&lt;BR /&gt;Chad&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 17 Aug 2006 11:01:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-job-executing-script-but-command-not-working/m-p/4997996#M97974</guid>
      <dc:creator>Chad Brindley</dc:creator>
      <dc:date>2006-08-17T11:01:21Z</dc:date>
    </item>
    <item>
      <title>Re: Cron Job Executing Script but Command not Working</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-job-executing-script-but-command-not-working/m-p/4997997#M97975</link>
      <description>&lt;BR /&gt;try using the fully qualified path to omnimm. &lt;BR /&gt;Cron is limited in its shell functions..........&lt;BR /&gt;</description>
      <pubDate>Thu, 17 Aug 2006 11:04:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-job-executing-script-but-command-not-working/m-p/4997997#M97975</guid>
      <dc:creator>DCE</dc:creator>
      <dc:date>2006-08-17T11:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: Cron Job Executing Script but Command not Working</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-job-executing-script-but-command-not-working/m-p/4997998#M97976</link>
      <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;cron has no environment.&lt;BR /&gt;&lt;BR /&gt;That means you need to set the PATH and anything else you need in the script.&lt;BR /&gt;&lt;BR /&gt;Quick and dirty:&lt;BR /&gt;&lt;BR /&gt;env &amp;gt; /tmp/env&lt;BR /&gt;&lt;BR /&gt;Put the critical parts of that in the script your cronjob calls.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Thu, 17 Aug 2006 11:05:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-job-executing-script-but-command-not-working/m-p/4997998#M97976</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2006-08-17T11:05:28Z</dc:date>
    </item>
    <item>
      <title>Re: Cron Job Executing Script but Command not Working</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-job-executing-script-but-command-not-working/m-p/4997999#M97977</link>
      <description>Hi Chad:&lt;BR /&gt;&lt;BR /&gt;The answers already given regarding the use of absolute paths the definition of any environmental variables you need should rectify your problem.  Please read the 'crontab(1)' manpages for more information there.&lt;BR /&gt;&lt;BR /&gt;In addition, the use of the path '/bin' in HP-UX is deprecated.  '/bin' is a symbolic (and transition) link to '/usr/bin'.  You should use '/usr/bin/sh' for your POSIX shell.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 17 Aug 2006 11:10:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-job-executing-script-but-command-not-working/m-p/4997999#M97977</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-08-17T11:10:21Z</dc:date>
    </item>
    <item>
      <title>Re: Cron Job Executing Script but Command not Working</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-job-executing-script-but-command-not-working/m-p/4998000#M97978</link>
      <description>Add this line very near the top of your script:&lt;BR /&gt;&lt;BR /&gt;export PATH=${PATH}:/opt/omni/bin:/opt/omni/lbin&lt;BR /&gt;&lt;BR /&gt;Cron's environment (including PATH) is intentionally very sparse.&lt;BR /&gt;</description>
      <pubDate>Thu, 17 Aug 2006 11:10:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-job-executing-script-but-command-not-working/m-p/4998000#M97978</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2006-08-17T11:10:26Z</dc:date>
    </item>
    <item>
      <title>Re: Cron Job Executing Script but Command not Working</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-job-executing-script-but-command-not-working/m-p/4998001#M97979</link>
      <description>Hi Guys,&lt;BR /&gt;&lt;BR /&gt;This works fine now, I put in the full path in the script and this works fine now.&lt;BR /&gt;&lt;BR /&gt;Thanks again. I will assign points now, all tiops helpful though even though I chose the path of just adding /opt/omni/bin in front of my commands. &lt;BR /&gt;&lt;BR /&gt;I didnt know this was a problem with cron jobs.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Chad</description>
      <pubDate>Thu, 17 Aug 2006 11:22:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-job-executing-script-but-command-not-working/m-p/4998001#M97979</guid>
      <dc:creator>Chad Brindley</dc:creator>
      <dc:date>2006-08-17T11:22:17Z</dc:date>
    </item>
    <item>
      <title>Re: Cron Job Executing Script but Command not Working</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-job-executing-script-but-command-not-working/m-p/4998002#M97980</link>
      <description>thanks all, points assigned accordingly. 10 for the exact answer but 8 and 9's for other s which would have worked but I didnt put into practice.&lt;BR /&gt;&lt;BR /&gt;Chadders</description>
      <pubDate>Thu, 17 Aug 2006 11:24:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-job-executing-script-but-command-not-working/m-p/4998002#M97980</guid>
      <dc:creator>Chad Brindley</dc:creator>
      <dc:date>2006-08-17T11:24:12Z</dc:date>
    </item>
  </channel>
</rss>

