<?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: &amp;quot;if&amp;quot; cron entries under MC / Service Guard in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/quot-if-quot-cron-entries-under-mc-service-guard/m-p/5019843#M428281</link>
    <description>Hi:&lt;BR /&gt;&lt;BR /&gt;The semicolon before the 'export' terminates the conditional nature.  I think you want something like this:&lt;BR /&gt;&lt;BR /&gt;[ -d /apps/cron_APP ] &amp;amp;&amp;amp; { APP_DIR=/apps/inst2/app;export APP_DIR;APP_DIR/bin/st&lt;BR /&gt;artlogroll &amp;gt;&amp;gt; $APP_DIR/logs/logroll.log 2&amp;gt;&amp;amp;1; }&lt;BR /&gt;&lt;BR /&gt;Note the semicolon at the end of the sequence before the closing curly brace.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
    <pubDate>Wed, 20 Dec 2006 09:38:54 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2006-12-20T09:38:54Z</dc:date>
    <item>
      <title>"if" cron entries under MC / Service Guard</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/quot-if-quot-cron-entries-under-mc-service-guard/m-p/5019841#M428279</link>
      <description>Hi Ladies and Gentlemen,&lt;BR /&gt;&lt;BR /&gt;I have 2-node cluster with common EVA storage and these nodes have identical crons with the lines like:&lt;BR /&gt;&lt;BR /&gt;# Run the Log Rollover utility each night&lt;BR /&gt;0 0 * * * [ -d /apps/cron_APP ] &amp;amp;&amp;amp; APP_DIR=/apps/inst2/app;export APP_DIR;APP_DIR/bin/startlogroll &amp;gt;&amp;gt; $APP_DIR/logs/logroll.log 2&amp;gt;&amp;amp;1 &lt;BR /&gt;&lt;BR /&gt;where /apps is a filesystem mounted by SG and cron_APP is a dir created specially for this "if" construction.  But nevertheless the mail of the cron owner is plugged with the messages like:&lt;BR /&gt;&lt;BR /&gt;***&lt;BR /&gt;Subject: cron&lt;BR /&gt;Content-Length: 366&lt;BR /&gt;Status: RO&lt;BR /&gt;&lt;BR /&gt;sh: /logs/logroll.log: Cannot create the specified file.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;*************************************************&lt;BR /&gt;Cron: The previous message is the standard output&lt;BR /&gt;      and standard error of one of your crontab commands:&lt;BR /&gt;&lt;BR /&gt;[ -d /apps/cron_APP ] &amp;amp;&amp;amp; APP_DIR=/apps/inst2/app;export APP_DIR;APP_DIR/bin/startlogroll &amp;gt;&amp;gt; $APP_DIR/logs/logroll.log 2&amp;gt;&amp;amp;1&lt;BR /&gt;&lt;BR /&gt;I receive this messages on the node where the /apps filesystem is UNMOUNTED, so the part after &amp;amp;&amp;amp; should not be executed at all, but cron tries to execute it anyway...&lt;BR /&gt;What could be wrong?</description>
      <pubDate>Wed, 20 Dec 2006 09:26:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/quot-if-quot-cron-entries-under-mc-service-guard/m-p/5019841#M428279</guid>
      <dc:creator>Victor Makukha</dc:creator>
      <dc:date>2006-12-20T09:26:32Z</dc:date>
    </item>
    <item>
      <title>Re: "if" cron entries under MC / Service Guard</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/quot-if-quot-cron-entries-under-mc-service-guard/m-p/5019842#M428280</link>
      <description>Hy&lt;BR /&gt;&lt;BR /&gt;Check this thread:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=820393" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=820393&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Regards</description>
      <pubDate>Wed, 20 Dec 2006 09:35:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/quot-if-quot-cron-entries-under-mc-service-guard/m-p/5019842#M428280</guid>
      <dc:creator>Oviwan</dc:creator>
      <dc:date>2006-12-20T09:35:37Z</dc:date>
    </item>
    <item>
      <title>Re: "if" cron entries under MC / Service Guard</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/quot-if-quot-cron-entries-under-mc-service-guard/m-p/5019843#M428281</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;The semicolon before the 'export' terminates the conditional nature.  I think you want something like this:&lt;BR /&gt;&lt;BR /&gt;[ -d /apps/cron_APP ] &amp;amp;&amp;amp; { APP_DIR=/apps/inst2/app;export APP_DIR;APP_DIR/bin/st&lt;BR /&gt;artlogroll &amp;gt;&amp;gt; $APP_DIR/logs/logroll.log 2&amp;gt;&amp;amp;1; }&lt;BR /&gt;&lt;BR /&gt;Note the semicolon at the end of the sequence before the closing curly brace.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 20 Dec 2006 09:38:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/quot-if-quot-cron-entries-under-mc-service-guard/m-p/5019843#M428281</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-12-20T09:38:54Z</dc:date>
    </item>
    <item>
      <title>Re: "if" cron entries under MC / Service Guard</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/quot-if-quot-cron-entries-under-mc-service-guard/m-p/5019844#M428282</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Three comments:&lt;BR /&gt;&lt;BR /&gt;1) Check if /apps/cron_APP exists as a directory on the root filesystem.  If it does, [ -d /apps/cron_APP ] would return 1.&lt;BR /&gt;&lt;BR /&gt;2) I don't see why you need to perform variable substitution here.  Just use explicit references to $APP_DIR:&lt;BR /&gt;0 0 * * * [ -d /apps/cron_APP ] &amp;amp;&amp;amp; /apps/inst2/bin/startlogroll &amp;gt;&amp;gt; /apps/inst2/app/logs/logroll.log 2&amp;gt;&amp;amp;1&lt;BR /&gt;&lt;BR /&gt;3) You have an error in your crontab entry:&lt;BR /&gt;...APP_DIR/bin/startlogroll...&lt;BR /&gt;should be:&lt;BR /&gt;...$APP_DIR/bin/start/logroll...&lt;BR /&gt;&lt;BR /&gt;PCS</description>
      <pubDate>Wed, 20 Dec 2006 09:44:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/quot-if-quot-cron-entries-under-mc-service-guard/m-p/5019844#M428282</guid>
      <dc:creator>spex</dc:creator>
      <dc:date>2006-12-20T09:44:55Z</dc:date>
    </item>
    <item>
      <title>Re: "if" cron entries under MC / Service Guard</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/quot-if-quot-cron-entries-under-mc-service-guard/m-p/5019845#M428283</link>
      <description>2 James:&lt;BR /&gt;Thanks very much, that's what I needed indeed.  I corrected the crontab and I'll check tomorrow if the logs are OK.&lt;BR /&gt;&lt;BR /&gt;2 Spex:&lt;BR /&gt;As far as I know test [ -d ... ] statement returns 0 if the statement is true and 1 if it does not find anyting...&lt;BR /&gt;</description>
      <pubDate>Wed, 20 Dec 2006 10:48:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/quot-if-quot-cron-entries-under-mc-service-guard/m-p/5019845#M428283</guid>
      <dc:creator>Victor Makukha</dc:creator>
      <dc:date>2006-12-20T10:48:56Z</dc:date>
    </item>
    <item>
      <title>Re: "if" cron entries under MC / Service Guard</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/quot-if-quot-cron-entries-under-mc-service-guard/m-p/5019846#M428284</link>
      <description>Yyyes, I'd checked, it works!</description>
      <pubDate>Thu, 21 Dec 2006 05:56:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/quot-if-quot-cron-entries-under-mc-service-guard/m-p/5019846#M428284</guid>
      <dc:creator>Victor Makukha</dc:creator>
      <dc:date>2006-12-21T05:56:27Z</dc:date>
    </item>
  </channel>
</rss>

