<?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 Cron job in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-job/m-p/2701178#M57902</link>
    <description>Hi,&lt;BR /&gt;I am not an expert in UX, just migrated from. So, the question i am putting up might be stupid, but please bear with me.&lt;BR /&gt;&lt;BR /&gt;Q)* * 1-7 * 6 job&lt;BR /&gt;&lt;BR /&gt;Would this run on the 1st saturday of the month or would it run on first 7 days as well as on all saturdays?&lt;BR /&gt;&lt;BR /&gt;Thanks for you patience!&lt;BR /&gt;Ben</description>
    <pubDate>Thu, 11 Apr 2002 07:34:07 GMT</pubDate>
    <dc:creator>Reuben Ernest</dc:creator>
    <dc:date>2002-04-11T07:34:07Z</dc:date>
    <item>
      <title>Cron job</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-job/m-p/2701178#M57902</link>
      <description>Hi,&lt;BR /&gt;I am not an expert in UX, just migrated from. So, the question i am putting up might be stupid, but please bear with me.&lt;BR /&gt;&lt;BR /&gt;Q)* * 1-7 * 6 job&lt;BR /&gt;&lt;BR /&gt;Would this run on the 1st saturday of the month or would it run on first 7 days as well as on all saturdays?&lt;BR /&gt;&lt;BR /&gt;Thanks for you patience!&lt;BR /&gt;Ben</description>
      <pubDate>Thu, 11 Apr 2002 07:34:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-job/m-p/2701178#M57902</guid>
      <dc:creator>Reuben Ernest</dc:creator>
      <dc:date>2002-04-11T07:34:07Z</dc:date>
    </item>
    <item>
      <title>Re: Cron job</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-job/m-p/2701179#M57903</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;This is the syntax&lt;BR /&gt;&lt;BR /&gt;    minute  hour  monthday  month  weekday  command&lt;BR /&gt;&lt;BR /&gt;not sure what overrides the other.&lt;BR /&gt;of course, there's no harm in testing is there??&lt;BR /&gt;&lt;BR /&gt;Grt, Emiel</description>
      <pubDate>Thu, 11 Apr 2002 07:42:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-job/m-p/2701179#M57903</guid>
      <dc:creator>Emiel van Grinsven</dc:creator>
      <dc:date>2002-04-11T07:42:32Z</dc:date>
    </item>
    <item>
      <title>Re: Cron job</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-job/m-p/2701180#M57904</link>
      <description>Reuben,&lt;BR /&gt;&lt;BR /&gt;From the man page of crontab:&lt;BR /&gt;...&lt;BR /&gt;Note that the&lt;BR /&gt;specification of days can be made in two fields: monthday and weekday &lt;BR /&gt;If both are specified in an entry, they are cumulative.  For example,                                                          &lt;BR /&gt;     0   0   1,15   *   1   command &lt;BR /&gt;runs command at midnight on the first and fifteenth of each month, as &lt;BR /&gt;well as every Monday.&lt;BR /&gt;...  &lt;BR /&gt;&lt;BR /&gt;Hope this clarifies it!&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Deepak.</description>
      <pubDate>Thu, 11 Apr 2002 07:45:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-job/m-p/2701180#M57904</guid>
      <dc:creator>Deepak Extross</dc:creator>
      <dc:date>2002-04-11T07:45:16Z</dc:date>
    </item>
    <item>
      <title>Re: Cron job</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-job/m-p/2701181#M57905</link>
      <description>take a look at this, &lt;BR /&gt;&lt;BR /&gt;Note that the &lt;BR /&gt;specification of days can be made in two fields: monthday and weekday. &lt;BR /&gt;If both are specified in an entry, they are cumulative. For example, &lt;BR /&gt;&lt;BR /&gt;0 0 1,15 * 1 command &lt;BR /&gt;&lt;BR /&gt;runs command at midnight on the first and fifteenth of each month, as &lt;BR /&gt;well as every Monday. &lt;BR /&gt;&lt;BR /&gt;hope it answers your problem, &lt;BR /&gt;&lt;BR /&gt;grt, Emiel</description>
      <pubDate>Thu, 11 Apr 2002 07:46:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-job/m-p/2701181#M57905</guid>
      <dc:creator>Emiel van Grinsven</dc:creator>
      <dc:date>2002-04-11T07:46:30Z</dc:date>
    </item>
    <item>
      <title>Re: Cron job</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-job/m-p/2701182#M57906</link>
      <description>For the entry " * * 1-7 * 6 job " in crontab,&lt;BR /&gt;It will run on first 7 days as well as on all saturdays.&lt;BR /&gt;&lt;BR /&gt;-Vijay&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 11 Apr 2002 07:46:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-job/m-p/2701182#M57906</guid>
      <dc:creator>K.Vijayaragavan.</dc:creator>
      <dc:date>2002-04-11T07:46:46Z</dc:date>
    </item>
    <item>
      <title>Re: Cron job</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-job/m-p/2701183#M57907</link>
      <description>Incidentally, * * 1-7 * 6 job means that you want the job to run EVERY MINUTE OF EVERY HOUR on the 1st to 7th of each month and on every Saturday.&lt;BR /&gt;&lt;BR /&gt;Just pointing this out, because its not everyday that one sees a '*' in the Minute and Hour field.</description>
      <pubDate>Thu, 11 Apr 2002 07:50:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-job/m-p/2701183#M57907</guid>
      <dc:creator>Deepak Extross</dc:creator>
      <dc:date>2002-04-11T07:50:02Z</dc:date>
    </item>
    <item>
      <title>Re: Cron job</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-job/m-p/2701184#M57908</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;I think 1-7 means on each day and if you had 1,7 it would mean day 1 and day 7.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Your job will run the first even days of the month and each saturday&lt;BR /&gt;&lt;BR /&gt;checkout man cron&lt;BR /&gt;&lt;BR /&gt;John&lt;BR /&gt;</description>
      <pubDate>Thu, 11 Apr 2002 07:50:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-job/m-p/2701184#M57908</guid>
      <dc:creator>John Carr_2</dc:creator>
      <dc:date>2002-04-11T07:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: Cron job</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-job/m-p/2701185#M57909</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I think it will run as you've suspected.&lt;BR /&gt;&lt;BR /&gt;What I would it to work out the particular&lt;BR /&gt;date relevant through a script, before &lt;BR /&gt;proceeding to run the jobs. &lt;BR /&gt;&lt;BR /&gt;Personally I would use something like the&lt;BR /&gt;information provided from the following&lt;BR /&gt;thread. I've utilised it on a number of&lt;BR /&gt;occassions and it really works well. &lt;BR /&gt;Our collegue Mr Stephenson has done a wonderful&lt;BR /&gt;job with this.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xe752d20fd34bd61190010090279cd0f9,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xe752d20fd34bd61190010090279cd0f9,00.html&lt;/A&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 11 Apr 2002 07:53:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-job/m-p/2701185#M57909</guid>
      <dc:creator>Michael Tully</dc:creator>
      <dc:date>2002-04-11T07:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: Cron job</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-job/m-p/2701186#M57910</link>
      <description>Thanks all for the response....now i need to figure out how to write a script that runs on 1 saturday of everymonth&lt;BR /&gt;&lt;BR /&gt;Ben</description>
      <pubDate>Thu, 11 Apr 2002 08:31:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-job/m-p/2701186#M57910</guid>
      <dc:creator>Reuben Ernest</dc:creator>
      <dc:date>2002-04-11T08:31:27Z</dc:date>
    </item>
    <item>
      <title>Re: Cron job</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-job/m-p/2701187#M57911</link>
      <description>Ben,&lt;BR /&gt;&lt;BR /&gt;You could try this:&lt;BR /&gt;Define your job to run on every Saturday like so:&lt;BR /&gt;0 0 * * 6 job&lt;BR /&gt;&lt;BR /&gt;Then, in your job, add the following:&lt;BR /&gt;#!/usr/bin/ksh&lt;BR /&gt;if [ $(date +%d) -lt 8 ] &lt;BR /&gt;then                     &lt;BR /&gt; &lt;DO your="" stuff=""&gt;&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;HTH.&lt;/DO&gt;</description>
      <pubDate>Thu, 11 Apr 2002 08:45:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-job/m-p/2701187#M57911</guid>
      <dc:creator>Deepak Extross</dc:creator>
      <dc:date>2002-04-11T08:45:14Z</dc:date>
    </item>
    <item>
      <title>Re: Cron job</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-job/m-p/2701188#M57912</link>
      <description>Deepak,&lt;BR /&gt;That was simple and to the point. Now i wonder why i didnt think of it in the first place :(&lt;BR /&gt;&lt;BR /&gt;Thanks a lot&lt;BR /&gt;Ben&lt;BR /&gt;</description>
      <pubDate>Thu, 11 Apr 2002 09:40:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-job/m-p/2701188#M57912</guid>
      <dc:creator>Reuben Ernest</dc:creator>
      <dc:date>2002-04-11T09:40:08Z</dc:date>
    </item>
    <item>
      <title>Re: Cron job</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-job/m-p/2701189#M57913</link>
      <description>Reuben&lt;BR /&gt;&lt;BR /&gt;0 0 * * 6 job &lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/ksh &lt;BR /&gt;if [ $(date +%d) -lt 8 ] &lt;BR /&gt;then &lt;BR /&gt;&lt;DO your="" stuff=""&gt; &lt;BR /&gt;fi &lt;BR /&gt;&lt;BR /&gt;is this really what you want, using this method "job" will only run once on the first Saturday of the month as subsequent saturdays the test will say date days is greater than 7 and not do anything.&lt;BR /&gt;&lt;BR /&gt;If you only want the job to run on the first saturday use cron&lt;BR /&gt;&lt;BR /&gt;* * * 6 * job&lt;BR /&gt;&lt;BR /&gt;John.&lt;/DO&gt;</description>
      <pubDate>Thu, 11 Apr 2002 10:01:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-job/m-p/2701189#M57913</guid>
      <dc:creator>John Carr_2</dc:creator>
      <dc:date>2002-04-11T10:01:36Z</dc:date>
    </item>
  </channel>
</rss>

