<?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 Scripts need hourly augment. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/scripts-need-hourly-augment/m-p/3795242#M547351</link>
    <description>My script need hour as an augument.&lt;BR /&gt;&lt;BR /&gt;For example:- If I want to check 3 AM log details I execute the script like below:&lt;BR /&gt;&lt;BR /&gt;./oom_moni.sh 3&lt;BR /&gt;&lt;BR /&gt;I want to execute this every hour so Iam scheduling through cron job on hourly basis.&lt;BR /&gt;&lt;BR /&gt;Problem is how can I pass hourly augument to my script.&lt;BR /&gt;Please advice in this matter</description>
    <pubDate>Fri, 26 May 2006 05:26:17 GMT</pubDate>
    <dc:creator>Saraswathy_1</dc:creator>
    <dc:date>2006-05-26T05:26:17Z</dc:date>
    <item>
      <title>Scripts need hourly augment.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripts-need-hourly-augment/m-p/3795242#M547351</link>
      <description>My script need hour as an augument.&lt;BR /&gt;&lt;BR /&gt;For example:- If I want to check 3 AM log details I execute the script like below:&lt;BR /&gt;&lt;BR /&gt;./oom_moni.sh 3&lt;BR /&gt;&lt;BR /&gt;I want to execute this every hour so Iam scheduling through cron job on hourly basis.&lt;BR /&gt;&lt;BR /&gt;Problem is how can I pass hourly augument to my script.&lt;BR /&gt;Please advice in this matter</description>
      <pubDate>Fri, 26 May 2006 05:26:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripts-need-hourly-augment/m-p/3795242#M547351</guid>
      <dc:creator>Saraswathy_1</dc:creator>
      <dc:date>2006-05-26T05:26:17Z</dc:date>
    </item>
    <item>
      <title>Re: Scripts need hourly augment.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripts-need-hourly-augment/m-p/3795243#M547352</link>
      <description>Have your script check the hour of the day using the date command:&lt;BR /&gt;&lt;BR /&gt;# date +'%H'&lt;BR /&gt;06&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Fri, 26 May 2006 05:30:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripts-need-hourly-augment/m-p/3795243#M547352</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2006-05-26T05:30:16Z</dc:date>
    </item>
    <item>
      <title>Re: Scripts need hourly augment.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripts-need-hourly-augment/m-p/3795244#M547353</link>
      <description>Thanks Pete,&lt;BR /&gt;&lt;BR /&gt;The problem now is &lt;BR /&gt;&lt;BR /&gt;If Iam executing script at 4 AM I should give augument as 3. (Which means Before number I should give)</description>
      <pubDate>Fri, 26 May 2006 05:37:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripts-need-hourly-augment/m-p/3795244#M547353</guid>
      <dc:creator>Saraswathy_1</dc:creator>
      <dc:date>2006-05-26T05:37:50Z</dc:date>
    </item>
    <item>
      <title>Re: Scripts need hourly augment.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripts-need-hourly-augment/m-p/3795245#M547354</link>
      <description>The obvious answer would be to set your cron job up to run at 3:59, rather than 4:00.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Fri, 26 May 2006 06:19:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripts-need-hourly-augment/m-p/3795245#M547354</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2006-05-26T06:19:04Z</dc:date>
    </item>
    <item>
      <title>Re: Scripts need hourly augment.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripts-need-hourly-augment/m-p/3795246#M547355</link>
      <description>Hi,&lt;BR /&gt;if you do have to run the script after 3:59 you could look into the TZ parameter.&lt;BR /&gt;&lt;BR /&gt;In the UK:&lt;BR /&gt;$ date +'%Y%m%d%H%M'&lt;BR /&gt;200605261237&lt;BR /&gt;$ TZ=BST date +'%Y%m%d%H%M' &lt;BR /&gt;200605261137&lt;BR /&gt;or for your case:&lt;BR /&gt;$ date +'%H'&lt;BR /&gt;12&lt;BR /&gt;$ TZ=BST date +'%H'  &lt;BR /&gt;11&lt;BR /&gt;</description>
      <pubDate>Fri, 26 May 2006 06:33:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripts-need-hourly-augment/m-p/3795246#M547355</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2006-05-26T06:33:20Z</dc:date>
    </item>
    <item>
      <title>Re: Scripts need hourly augment.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripts-need-hourly-augment/m-p/3795247#M547356</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;If you want to deduct an hour from your current runtime, I would use a Perl snippet like:&lt;BR /&gt;&lt;BR /&gt;# perl -le '$t=(localtime(time()-3600)) [2];print $t'&lt;BR /&gt;&lt;BR /&gt;Perl handles time/date in epoch seconds, so 3600 is the equivalent of one-hour.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 26 May 2006 06:48:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripts-need-hourly-augment/m-p/3795247#M547356</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-05-26T06:48:49Z</dc:date>
    </item>
    <item>
      <title>Re: Scripts need hourly augment.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripts-need-hourly-augment/m-p/3795248#M547357</link>
      <description>get hour of the time with date '+%H' and do following to get required argumnets.&lt;BR /&gt;&lt;BR /&gt;if [ "$(date '+%H'|cut -c1) = "0" ];then&lt;BR /&gt;hour=$(date '+%H'|cut -c2)&lt;BR /&gt;else&lt;BR /&gt;hour=$(date '+%H')&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;then call your script.&lt;BR /&gt;your_script ${hour}</description>
      <pubDate>Fri, 26 May 2006 06:53:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripts-need-hourly-augment/m-p/3795248#M547357</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2006-05-26T06:53:39Z</dc:date>
    </item>
  </channel>
</rss>

