<?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 help in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-help/m-p/3799603#M782345</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;and even more - don't forget - as the previous poster, that a %-sign in a crontab-entry has a special meaning and must be escaped.&lt;BR /&gt;I think in HP-UX you have to write two percent signs:&lt;BR /&gt;05,25 * * * * exec ksh -c '. ${HOME}/.profile;~/parse.sh &amp;gt;&amp;gt; /log/parse.`date +%%m.%%d.%%y`.log&lt;BR /&gt;&lt;BR /&gt;mfG Peter</description>
    <pubDate>Mon, 05 Jun 2006 09:10:29 GMT</pubDate>
    <dc:creator>Peter Nikitka</dc:creator>
    <dc:date>2006-06-05T09:10:29Z</dc:date>
    <item>
      <title>cron help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-help/m-p/3799600#M782342</link>
      <description>I have few cron entries that will process some scripts and redirect the output to a log file.&lt;BR /&gt;&lt;BR /&gt;But since the log grows over time I would like to create a separate output for each day&lt;BR /&gt;&lt;BR /&gt;ex-&lt;BR /&gt;&lt;BR /&gt;current entry:&lt;BR /&gt;&lt;BR /&gt;05,25 * * * *   exec ksh -c '. ${HOME}/.profile;~/parse.sh &amp;gt;&amp;gt; /log/parse.log'&lt;BR /&gt;&lt;BR /&gt;I would like to have &lt;BR /&gt;&lt;BR /&gt;05,25 * * * * exec ksh -c '. ${HOME}/.profile;~/parse.sh &amp;gt; /log/parse.log_06022006'&lt;BR /&gt;&lt;BR /&gt;Can anyone please help me.&lt;BR /&gt;&lt;BR /&gt;-Pat</description>
      <pubDate>Fri, 02 Jun 2006 14:26:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-help/m-p/3799600#M782342</guid>
      <dc:creator>Pat Peter</dc:creator>
      <dc:date>2006-06-02T14:26:03Z</dc:date>
    </item>
    <item>
      <title>Re: cron help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-help/m-p/3799601#M782343</link>
      <description>how about:&lt;BR /&gt;&lt;BR /&gt;05,25 * * * * exec ksh -c '. ${HOME}/.profile;~/parse.sh &amp;gt; /log/parse.log_`date +%m%d%Y`'</description>
      <pubDate>Fri, 02 Jun 2006 14:33:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-help/m-p/3799601#M782343</guid>
      <dc:creator>john kingsley</dc:creator>
      <dc:date>2006-06-02T14:33:00Z</dc:date>
    </item>
    <item>
      <title>Re: cron help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-help/m-p/3799602#M782344</link>
      <description>Pat,&lt;BR /&gt;&lt;BR /&gt;Don't forget to redirect with "&amp;gt;&amp;gt;", otherwise the file will be recreated every-time the cronjob starts.&lt;BR /&gt;&lt;BR /&gt;05,25 * * * * exec ksh -c '. ${HOME}/.profile;~/parse.sh &amp;gt;&amp;gt; /log/parse.log_`date +%m%d%Y`' &lt;BR /&gt;&lt;BR /&gt;Darrel</description>
      <pubDate>Fri, 02 Jun 2006 14:43:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-help/m-p/3799602#M782344</guid>
      <dc:creator>Darrel Louis</dc:creator>
      <dc:date>2006-06-02T14:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: cron help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-help/m-p/3799603#M782345</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;and even more - don't forget - as the previous poster, that a %-sign in a crontab-entry has a special meaning and must be escaped.&lt;BR /&gt;I think in HP-UX you have to write two percent signs:&lt;BR /&gt;05,25 * * * * exec ksh -c '. ${HOME}/.profile;~/parse.sh &amp;gt;&amp;gt; /log/parse.`date +%%m.%%d.%%y`.log&lt;BR /&gt;&lt;BR /&gt;mfG Peter</description>
      <pubDate>Mon, 05 Jun 2006 09:10:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-help/m-p/3799603#M782345</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2006-06-05T09:10:29Z</dc:date>
    </item>
    <item>
      <title>Re: cron help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-help/m-p/3799604#M782346</link>
      <description>It might be cleaner to create and schedule a separate script to handle switching out of your parse.log, as well as other logfiles.  Something like:&lt;BR /&gt;&lt;BR /&gt;#!/usr/sbin/sh&lt;BR /&gt;DATE=`date +%Y%m%d`&lt;BR /&gt;cp /log/parse.log /log/parse.${DATE}.log&lt;BR /&gt;cat /dev/null &amp;gt; /log/parse.log&lt;BR /&gt;&lt;BR /&gt;Have the script run just before midnight, so that the date in the filename matches the date of the log's contents.&lt;BR /&gt;&lt;BR /&gt;PCS</description>
      <pubDate>Mon, 05 Jun 2006 09:42:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-help/m-p/3799604#M782346</guid>
      <dc:creator>spex</dc:creator>
      <dc:date>2006-06-05T09:42:54Z</dc:date>
    </item>
    <item>
      <title>Re: cron help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-help/m-p/3799605#M782347</link>
      <description>Hey;&lt;BR /&gt;&lt;BR /&gt;Personally, I'd put the log inside the script:&lt;BR /&gt;&lt;BR /&gt;Date=$(date +"%y%m%d")&lt;BR /&gt;Log=/log/parse_log_${Date}&lt;BR /&gt;&lt;BR /&gt;(&lt;BR /&gt;commands to be executed&lt;BR /&gt;) &amp;gt;&amp;gt; ${Log} 2&amp;gt;&amp;amp;1&lt;BR /&gt;&lt;BR /&gt;that way the crontab stays a little cleaner...&lt;BR /&gt;&lt;BR /&gt;Doug</description>
      <pubDate>Mon, 05 Jun 2006 11:58:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-help/m-p/3799605#M782347</guid>
      <dc:creator>Doug O'Leary</dc:creator>
      <dc:date>2006-06-05T11:58:59Z</dc:date>
    </item>
  </channel>
</rss>

