<?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 job to run 1st Saturday of each month in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-job-to-run-1st-saturday-of-each-month/m-p/4969022#M417403</link>
    <description>The 1st Sat of each month will be a date of 1-7. If the day today is '6' (date +%U) &amp;amp;&amp;amp; date is day of month is "01-07' (date +%d)&lt;BR /&gt;&lt;BR /&gt;If both of these conditions are met then today is the 1st Sat of a month</description>
    <pubDate>Wed, 22 Mar 2006 10:08:41 GMT</pubDate>
    <dc:creator>Rick Garland</dc:creator>
    <dc:date>2006-03-22T10:08:41Z</dc:date>
    <item>
      <title>Cron job to run 1st Saturday of each month</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-job-to-run-1st-saturday-of-each-month/m-p/4969019#M417400</link>
      <description>Is it possible to have a cron entry to run on the 1st Saturday of each month?</description>
      <pubDate>Wed, 22 Mar 2006 09:45:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-job-to-run-1st-saturday-of-each-month/m-p/4969019#M417400</guid>
      <dc:creator>nancy rippey</dc:creator>
      <dc:date>2006-03-22T09:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: Cron job to run 1st Saturday of each month</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-job-to-run-1st-saturday-of-each-month/m-p/4969020#M417401</link>
      <description>Shalom Nancy,&lt;BR /&gt;&lt;BR /&gt;cron can't do it.&lt;BR /&gt;&lt;BR /&gt;Date hammer can calculate the date in a cron script.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.hpux.ws/merijn/caldj.sh" target="_blank"&gt;http://www.hpux.ws/merijn/caldj.sh&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://www.hpux.ws/merijn/caldj.pl" target="_blank"&gt;http://www.hpux.ws/merijn/caldj.pl&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Wed, 22 Mar 2006 10:06:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-job-to-run-1st-saturday-of-each-month/m-p/4969020#M417401</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2006-03-22T10:06:44Z</dc:date>
    </item>
    <item>
      <title>Re: Cron job to run 1st Saturday of each month</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-job-to-run-1st-saturday-of-each-month/m-p/4969021#M417402</link>
      <description>Not with just cron but you can have the job run every Saturday and then let it decide whether or not this is the 1st (or Nth) Saturday.&lt;BR /&gt;&lt;BR /&gt;Here's one approach: Create a cron entry that will run at your chosen time every Saturday, then:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;&lt;BR /&gt;export PATH=${PATH}:/usr/local/bin&lt;BR /&gt;typeset -i STAT=0&lt;BR /&gt;if [[ $(caljd.sh -N) -eq 1 ]]&lt;BR /&gt;  then&lt;BR /&gt;    echo "It's the 1st Saturday; do your thing"&lt;BR /&gt;    # execute your command and set ${STAT}&lt;BR /&gt;  fi&lt;BR /&gt;exit ${STAT}&lt;BR /&gt;&lt;BR /&gt;This assumes that you have installed the attached caljd.sh in /usr/local/bin. Invoke as caljd.sh -u for full usage and many examples.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 22 Mar 2006 10:08:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-job-to-run-1st-saturday-of-each-month/m-p/4969021#M417402</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2006-03-22T10:08:22Z</dc:date>
    </item>
    <item>
      <title>Re: Cron job to run 1st Saturday of each month</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-job-to-run-1st-saturday-of-each-month/m-p/4969022#M417403</link>
      <description>The 1st Sat of each month will be a date of 1-7. If the day today is '6' (date +%U) &amp;amp;&amp;amp; date is day of month is "01-07' (date +%d)&lt;BR /&gt;&lt;BR /&gt;If both of these conditions are met then today is the 1st Sat of a month</description>
      <pubDate>Wed, 22 Mar 2006 10:08:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-job-to-run-1st-saturday-of-each-month/m-p/4969022#M417403</guid>
      <dc:creator>Rick Garland</dc:creator>
      <dc:date>2006-03-22T10:08:41Z</dc:date>
    </item>
    <item>
      <title>Re: Cron job to run 1st Saturday of each month</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-job-to-run-1st-saturday-of-each-month/m-p/4969023#M417404</link>
      <description>hi nancy,&lt;BR /&gt;also consider using the following as template for your crontab:&lt;BR /&gt;&lt;BR /&gt;#*******************************************************************************&lt;BR /&gt;# min|hour |day  |month|day  |script&lt;BR /&gt;#    |     |of mo|     |of wk|&lt;BR /&gt;#----|-----|-----|-----|-----|--------------------------------------------------&lt;BR /&gt;#*******************************************************************************&lt;BR /&gt;#*******************************************************************************&lt;BR /&gt;# END OF TABLE           day0-&amp;gt;Sunday  day6-&amp;gt;Saturday&lt;BR /&gt;#*******************************************************************************&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;hope this helps!&lt;BR /&gt;&lt;BR /&gt;kind regards&lt;BR /&gt;yogeeraj</description>
      <pubDate>Wed, 22 Mar 2006 23:03:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-job-to-run-1st-saturday-of-each-month/m-p/4969023#M417404</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2006-03-22T23:03:40Z</dc:date>
    </item>
    <item>
      <title>Re: Cron job to run 1st Saturday of each month</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-job-to-run-1st-saturday-of-each-month/m-p/4969024#M417405</link>
      <description>Use format in crontab as,&lt;BR /&gt;&lt;BR /&gt;minute  hour  monthday  month  weekday  command&lt;BR /&gt;&lt;BR /&gt;to run on 1st saturday then,&lt;BR /&gt;&lt;BR /&gt;&lt;MINUTE&gt; &lt;HOUR&gt; 1-7 * * &lt;COMMAND script=""&gt;&lt;/COMMAND&gt;&lt;BR /&gt;In command script&amp;gt;&lt;BR /&gt;&lt;BR /&gt;if [[ "$(date +'%a')" != "Sat" ]]&lt;BR /&gt;then&lt;BR /&gt;  exit 0&lt;BR /&gt;else&lt;BR /&gt;  &lt;EXECUTION instructions=""&gt;&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;--&lt;BR /&gt;Muthu&lt;/EXECUTION&gt;&lt;/HOUR&gt;&lt;/MINUTE&gt;</description>
      <pubDate>Thu, 23 Mar 2006 00:00:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-job-to-run-1st-saturday-of-each-month/m-p/4969024#M417405</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2006-03-23T00:00:34Z</dc:date>
    </item>
    <item>
      <title>Re: Cron job to run 1st Saturday of each month</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-job-to-run-1st-saturday-of-each-month/m-p/4969025#M417406</link>
      <description>Hi nancy,&lt;BR /&gt;&lt;BR /&gt;# minute  hour  monthday  month  weekday (0=Sunday)  command&lt;BR /&gt;# 0-59    0-23  1-31      1-12   0-6&lt;BR /&gt;* * 1-7 * 6 &lt;YOUR_SCRIPT&gt;&lt;/YOUR_SCRIPT&gt;&lt;BR /&gt;This will run your script on Saturday only during days from 1 to 7 of the month.&lt;BR /&gt;i.e.: first Saturday of teh month&lt;BR /&gt;(environment: HP-UX 11i)&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Art</description>
      <pubDate>Thu, 23 Mar 2006 04:20:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-job-to-run-1st-saturday-of-each-month/m-p/4969025#M417406</guid>
      <dc:creator>Arturo Galbiati</dc:creator>
      <dc:date>2006-03-23T04:20:58Z</dc:date>
    </item>
    <item>
      <title>Re: Cron job to run 1st Saturday of each month</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-job-to-run-1st-saturday-of-each-month/m-p/4969026#M417407</link>
      <description>Thank you all for the valuable information.  I tested with many of the ways given and they seem to work.  Thanks again</description>
      <pubDate>Thu, 23 Mar 2006 09:21:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-job-to-run-1st-saturday-of-each-month/m-p/4969026#M417407</guid>
      <dc:creator>nancy rippey</dc:creator>
      <dc:date>2006-03-23T09:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: Cron job to run 1st Saturday of each month</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-job-to-run-1st-saturday-of-each-month/m-p/4969027#M417408</link>
      <description>Hi Nancy, &lt;BR /&gt;&lt;BR /&gt;You can find these docs for more information, &lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://docs.hp.com/en/B2355-60127/crontab.1.html" target="_blank"&gt;http://docs.hp.com/en/B2355-60127/crontab.1.html&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://www.adminschoice.com/docs/crontab.htm" target="_blank"&gt;http://www.adminschoice.com/docs/crontab.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;-Arun</description>
      <pubDate>Thu, 23 Mar 2006 09:26:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-job-to-run-1st-saturday-of-each-month/m-p/4969027#M417408</guid>
      <dc:creator>Arunvijai_4</dc:creator>
      <dc:date>2006-03-23T09:26:47Z</dc:date>
    </item>
    <item>
      <title>Re: Cron job to run 1st Saturday of each month</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-job-to-run-1st-saturday-of-each-month/m-p/4969028#M417409</link>
      <description>This suggested solution will certainly run the cron job on the 1st Saturday of the month; however it will also run the cron job on EVERY Saturday of the month and, in addition, will also execute on the 1st through 7th days of the month.&lt;BR /&gt;&lt;BR /&gt; # minute hour monthday month weekday (0=Sunday) command &lt;BR /&gt;# 0-59 0-23 1-31 1-12 0-6 &lt;BR /&gt;* * 1-7 * 6 &lt;YOUR_SCRIPT&gt;&lt;/YOUR_SCRIPT&gt;&lt;BR /&gt;Dates specified as both days of the month and days of the week are logical OR's not&lt;BR /&gt;logical AND's.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 23 Mar 2006 10:07:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-job-to-run-1st-saturday-of-each-month/m-p/4969028#M417409</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2006-03-23T10:07:29Z</dc:date>
    </item>
    <item>
      <title>Re: Cron job to run 1st Saturday of each month</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-job-to-run-1st-saturday-of-each-month/m-p/4969029#M417410</link>
      <description>This thread is now closed</description>
      <pubDate>Thu, 23 Mar 2006 10:12:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-job-to-run-1st-saturday-of-each-month/m-p/4969029#M417410</guid>
      <dc:creator>nancy rippey</dc:creator>
      <dc:date>2006-03-23T10:12:22Z</dc:date>
    </item>
  </channel>
</rss>

