<?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 I need a script ..cron in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/i-need-a-script-cron/m-p/4898298#M403612</link>
    <description>.. that every 1th Friday on every month run a command ..&lt;BR /&gt;&lt;BR /&gt;Can you help me ?&lt;BR /&gt;&lt;BR /&gt;Thanks &lt;BR /&gt;</description>
    <pubDate>Tue, 26 Apr 2005 09:24:25 GMT</pubDate>
    <dc:creator>claudio_22</dc:creator>
    <dc:date>2005-04-26T09:24:25Z</dc:date>
    <item>
      <title>I need a script ..cron</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/i-need-a-script-cron/m-p/4898298#M403612</link>
      <description>.. that every 1th Friday on every month run a command ..&lt;BR /&gt;&lt;BR /&gt;Can you help me ?&lt;BR /&gt;&lt;BR /&gt;Thanks &lt;BR /&gt;</description>
      <pubDate>Tue, 26 Apr 2005 09:24:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/i-need-a-script-cron/m-p/4898298#M403612</guid>
      <dc:creator>claudio_22</dc:creator>
      <dc:date>2005-04-26T09:24:25Z</dc:date>
    </item>
    <item>
      <title>Re: I need a script ..cron</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/i-need-a-script-cron/m-p/4898299#M403613</link>
      <description>Set up your crontab entry to run on every friday and then check in your script to see if the day of the month is less than 8.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Tue, 26 Apr 2005 09:29:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/i-need-a-script-cron/m-p/4898299#M403613</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2005-04-26T09:29:28Z</dc:date>
    </item>
    <item>
      <title>Re: I need a script ..cron</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/i-need-a-script-cron/m-p/4898300#M403614</link>
      <description>Have a cron entry run your script every Friday at whatever time you like. You then let the script determine if this is the first, second, ... Friday of the month and either execute normally or exit. The attached script will do this nicely and is very easy to modify for any occurence of a weekday with a month.&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;&lt;BR /&gt;export PATH=${PATH}:/usr/local/bin&lt;BR /&gt;&lt;BR /&gt;if [[ $(caljd.sh -N) -eq 1 ]]&lt;BR /&gt;  then&lt;BR /&gt;    echo "First Friday; do your thing"&lt;BR /&gt;  else&lt;BR /&gt;    exit 0&lt;BR /&gt;  fi&lt;BR /&gt;&lt;BR /&gt;---------------------------&lt;BR /&gt;The above example assumes that you installed the attached, caljd.sh, in /usr/local/bin.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 26 Apr 2005 09:30:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/i-need-a-script-cron/m-p/4898300#M403614</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2005-04-26T09:30:07Z</dc:date>
    </item>
    <item>
      <title>Re: I need a script ..cron</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/i-need-a-script-cron/m-p/4898301#M403615</link>
      <description>I would suggest a regular cron script that uses the following tool:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.hpux.ws/merijn/caljd-2.23.sh" target="_blank"&gt;http://www.hpux.ws/merijn/caljd-2.23.sh&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.hpux.ws/merijn/caljd-2.2.pl" target="_blank"&gt;http://www.hpux.ws/merijn/caljd-2.2.pl&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;These well documented tools will let you decide if its the first friday of the month.&lt;BR /&gt;&lt;BR /&gt;Have cron run the script every friday and a decision within the secript on whether to act based on what friday it is, using the tool of choice above.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Tue, 26 Apr 2005 09:30:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/i-need-a-script-cron/m-p/4898301#M403615</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2005-04-26T09:30:40Z</dc:date>
    </item>
    <item>
      <title>Re: I need a script ..cron</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/i-need-a-script-cron/m-p/4898302#M403616</link>
      <description>To complete Pete's answer : &lt;BR /&gt;&lt;BR /&gt;. in crontab, line must begin like that&lt;BR /&gt;00 12 * * 5 my_command...&lt;BR /&gt;(will start every friday at 12:00)&lt;BR /&gt;&lt;BR /&gt;. Your script must start with something like that :&lt;BR /&gt;[ ! $(date +%d) -lt 8 ] &amp;amp;&amp;amp; exit 0&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Fred&lt;BR /&gt;</description>
      <pubDate>Tue, 26 Apr 2005 09:38:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/i-need-a-script-cron/m-p/4898302#M403616</guid>
      <dc:creator>Fred Ruffet</dc:creator>
      <dc:date>2005-04-26T09:38:51Z</dc:date>
    </item>
    <item>
      <title>Re: I need a script ..cron</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/i-need-a-script-cron/m-p/4898303#M403617</link>
      <description>#!/bin/sh&lt;BR /&gt;&lt;BR /&gt;DOM=`date -u +"%d"`&lt;BR /&gt;&lt;BR /&gt;if [ "$DOM" -gt 8 ]&lt;BR /&gt;then&lt;BR /&gt;    # Not first Friday&lt;BR /&gt;    exit&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;# Do your stuff&lt;BR /&gt;</description>
      <pubDate>Tue, 26 Apr 2005 09:39:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/i-need-a-script-cron/m-p/4898303#M403617</guid>
      <dc:creator>Stephen Keane</dc:creator>
      <dc:date>2005-04-26T09:39:10Z</dc:date>
    </item>
    <item>
      <title>Re: I need a script ..cron</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/i-need-a-script-cron/m-p/4898304#M403618</link>
      <description>Thanks a lot :-)&lt;BR /&gt;&lt;BR /&gt;Bye&lt;BR /&gt;</description>
      <pubDate>Tue, 26 Apr 2005 09:40:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/i-need-a-script-cron/m-p/4898304#M403618</guid>
      <dc:creator>claudio_22</dc:creator>
      <dc:date>2005-04-26T09:40:18Z</dc:date>
    </item>
    <item>
      <title>Re: I need a script ..cron</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/i-need-a-script-cron/m-p/4898305#M403619</link>
      <description>.</description>
      <pubDate>Tue, 26 Apr 2005 09:40:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/i-need-a-script-cron/m-p/4898305#M403619</guid>
      <dc:creator>claudio_22</dc:creator>
      <dc:date>2005-04-26T09:40:38Z</dc:date>
    </item>
  </channel>
</rss>

