<?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 issue in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-issue/m-p/4465181#M360384</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Can you try this..&lt;BR /&gt;&lt;BR /&gt;* * * * * /tmp/scr.sh &amp;gt;&amp;gt; /tmp/scr.log&lt;BR /&gt;&lt;BR /&gt;use append (&amp;gt;&amp;gt;) instead of diversion (&amp;gt;)</description>
    <pubDate>Thu, 23 Jul 2009 03:49:50 GMT</pubDate>
    <dc:creator>SUDHAKAR_18</dc:creator>
    <dc:date>2009-07-23T03:49:50Z</dc:date>
    <item>
      <title>cron issue</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-issue/m-p/4465180#M360383</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Good Day&lt;BR /&gt;&lt;BR /&gt;we create a cron entry in an ordinary user account, like given below:&lt;BR /&gt;&lt;BR /&gt;* * * * * /tmp/scr.sh &amp;gt; /tmp/scr.log&lt;BR /&gt;&lt;BR /&gt;when above executes, the scr.log always found empty?&lt;BR /&gt;&lt;BR /&gt;Given below tests have been performed to diagnose/resolve:&lt;BR /&gt;&lt;BR /&gt;1. execute /tmp/scr.sh manually through ordinary user account, all the commands sequentially executes without any problem.&lt;BR /&gt;&lt;BR /&gt;2. we have replaced already written commands in scr.sh file with a single command like echo 'test-output' &amp;gt; /tmp/echo.out. and then run 'scr.sh' through cron; strangly it also run without any problem which is confusing me.&lt;BR /&gt;&lt;BR /&gt;Now, some questions arose:&lt;BR /&gt;&lt;BR /&gt;Why an echo command is executing through cron in scr.sh and the other commands NOT?&lt;BR /&gt;&lt;BR /&gt;Why other commands are running without any problem when running on CLI like &lt;BR /&gt;&lt;BR /&gt;chmod +x /tmp/scr.sh&lt;BR /&gt;/tmp/scr.sh&lt;BR /&gt;&lt;BR /&gt;it runs fine, but through cron it won't?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Muhammad Ahmad</description>
      <pubDate>Thu, 23 Jul 2009 03:43:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-issue/m-p/4465180#M360383</guid>
      <dc:creator>Muhammad Ahmad</dc:creator>
      <dc:date>2009-07-23T03:43:31Z</dc:date>
    </item>
    <item>
      <title>Re: cron issue</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-issue/m-p/4465181#M360384</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Can you try this..&lt;BR /&gt;&lt;BR /&gt;* * * * * /tmp/scr.sh &amp;gt;&amp;gt; /tmp/scr.log&lt;BR /&gt;&lt;BR /&gt;use append (&amp;gt;&amp;gt;) instead of diversion (&amp;gt;)</description>
      <pubDate>Thu, 23 Jul 2009 03:49:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-issue/m-p/4465181#M360384</guid>
      <dc:creator>SUDHAKAR_18</dc:creator>
      <dc:date>2009-07-23T03:49:50Z</dc:date>
    </item>
    <item>
      <title>Re: cron issue</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-issue/m-p/4465182#M360385</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Your checks :&lt;BR /&gt;&lt;BR /&gt;1]Check cron daemon is working properly, by using other simple test script.&lt;BR /&gt;&lt;BR /&gt;2]Arrange the cron entry as mentioned below,so that you will get the details of errors you will get while excuting.&lt;BR /&gt;&lt;BR /&gt;***** /tmp/scr.sh 2&amp;gt;&amp;gt;/tmp/scr.log.&lt;BR /&gt;&lt;BR /&gt;3]Check the shell you are keeping as a magic line while starting the script.&lt;BR /&gt;&lt;BR /&gt;3]Check whther you ve any line which clears executable logs.&lt;BR /&gt;&lt;BR /&gt;Please check and let me know result as well as share script contents to check.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Rgds&lt;BR /&gt;&lt;BR /&gt;Yogesh&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 23 Jul 2009 03:56:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-issue/m-p/4465182#M360385</guid>
      <dc:creator>Yogesh M Puranik</dc:creator>
      <dc:date>2009-07-23T03:56:54Z</dc:date>
    </item>
    <item>
      <title>Re: cron issue</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-issue/m-p/4465183#M360386</link>
      <description>Hi Muhammad,&lt;BR /&gt;&lt;BR /&gt;If you want to redirect the standard output and standard errors produced by the script to a file, you should use like below.&lt;BR /&gt;&lt;BR /&gt;* * * * * /tmp/scr.sh &amp;gt; /tmp/scr.log 2&amp;gt;&amp;amp;1&lt;BR /&gt;&lt;BR /&gt;or to avoid overwrite&lt;BR /&gt;&lt;BR /&gt;* * * * * /tmp/scr.sh &amp;gt;&amp;gt; /tmp/scr.log 2&amp;gt;&amp;amp;1</description>
      <pubDate>Thu, 23 Jul 2009 04:11:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-issue/m-p/4465183#M360386</guid>
      <dc:creator>Ganesan R</dc:creator>
      <dc:date>2009-07-23T04:11:26Z</dc:date>
    </item>
    <item>
      <title>Re: cron issue</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-issue/m-p/4465184#M360387</link>
      <description>&amp;gt;when above executes, the scr.log always found empty?&lt;BR /&gt;&lt;BR /&gt;It is possible you don't have PATH set properly for the command you want to execute, so you get no output.  cron has a limited PATH.  That's why it works when you do it manually.</description>
      <pubDate>Thu, 23 Jul 2009 09:02:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-issue/m-p/4465184#M360387</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-07-23T09:02:26Z</dc:date>
    </item>
    <item>
      <title>Re: cron issue</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-issue/m-p/4465185#M360388</link>
      <description>Hi Muhammad,&lt;BR /&gt;   As a test Spaces can be safely removed and if there is a problem executing you can also redirect the error message to the file&lt;BR /&gt;&lt;BR /&gt;please try executing the following command via command line and check if it works&lt;BR /&gt;&lt;BR /&gt;sh -x /tmp/scr.sh&amp;gt;&amp;gt;/tmp/scr.log&lt;BR /&gt;&lt;BR /&gt;this way you can confirm if there are any error that occurred executing the command&lt;BR /&gt;&lt;BR /&gt;then could you try the following please&lt;BR /&gt;&lt;BR /&gt;* * * * * /tmp/scr.sh&amp;gt;&amp;gt;/tmp/scr.log 2&amp;gt;&amp;amp;1&lt;BR /&gt;</description>
      <pubDate>Fri, 24 Jul 2009 09:53:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-issue/m-p/4465185#M360388</guid>
      <dc:creator>Proboi</dc:creator>
      <dc:date>2009-07-24T09:53:05Z</dc:date>
    </item>
  </channel>
</rss>

