<?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: how to schedule the work in every two hours in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/how-to-schedule-the-work-in-every-two-hours/m-p/3381636#M14135</link>
    <description>Frederick,&lt;BR /&gt;&lt;BR /&gt;Acording to the crontab (5) man page the crontab entry can be:&lt;BR /&gt;&lt;BR /&gt;0 0-23/2 * * * your2hourCommand&lt;BR /&gt;or&lt;BR /&gt;0 */2 * * * your2hourCommand&lt;BR /&gt;or&lt;BR /&gt;0 0,2,4,6,8,10,12,14,16,18,20,22  * * * your2hourCommand&lt;BR /&gt;&lt;BR /&gt;I tested all 3 variants on the first field  (minute) and they work.&lt;BR /&gt;&lt;BR /&gt;Dont forget to finish the line with a new line! It seems that cron ignore lines which are not terminated by a linefeed&lt;BR /&gt;&lt;BR /&gt;Bojan</description>
    <pubDate>Sat, 18 Sep 2004 07:01:56 GMT</pubDate>
    <dc:creator>Bojan Nemec</dc:creator>
    <dc:date>2004-09-18T07:01:56Z</dc:date>
    <item>
      <title>how to schedule the work in every two hours</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-schedule-the-work-in-every-two-hours/m-p/3381633#M14132</link>
      <description>i tried many times by cron, but did not meet the expect. could any gentleman show me example?&lt;BR /&gt;&lt;BR /&gt;thanks very much&lt;BR /&gt;frederick</description>
      <pubDate>Sat, 18 Sep 2004 04:59:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-schedule-the-work-in-every-two-hours/m-p/3381633#M14132</guid>
      <dc:creator>frederick van targero_1</dc:creator>
      <dc:date>2004-09-18T04:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: how to schedule the work in every two hours</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-schedule-the-work-in-every-two-hours/m-p/3381634#M14133</link>
      <description>Here is an example to do df every 2 hours.&lt;BR /&gt;&lt;BR /&gt;to edit do crontab -e&lt;BR /&gt;&lt;BR /&gt;add the following lines &lt;BR /&gt;&lt;BR /&gt;00 2 * * * /usr/bin/df &amp;gt;&amp;gt; t.t&lt;BR /&gt;00 4 * * * /usr/bin/df &amp;gt;&amp;gt; t.t&lt;BR /&gt;00 6 * * * /usr/bin/df &amp;gt;&amp;gt; t.t&lt;BR /&gt;00 8 * * * /usr/bin/df &amp;gt;&amp;gt; t.t&lt;BR /&gt;00 10 * * * /bin/df &amp;gt;&amp;gt; t.t&lt;BR /&gt;00 12 * * * /bin/df &amp;gt;&amp;gt; t.t&lt;BR /&gt;00 14 * * * /bin/df &amp;gt;&amp;gt; t.t&lt;BR /&gt;00 16 * * * /bin/df &amp;gt;&amp;gt; t.t&lt;BR /&gt;00 18 * * * /bin/df &amp;gt;&amp;gt; t.t&lt;BR /&gt;00 20 * * * /bin/df &amp;gt;&amp;gt; t.t&lt;BR /&gt;00 22 * * * /bin/df &amp;gt;&amp;gt; t.t&lt;BR /&gt;00 00 * * * /bin/df &amp;gt;&amp;gt; t.t&lt;BR /&gt;&lt;BR /&gt;this will run df every two hour and save output to file.&lt;BR /&gt;&lt;BR /&gt;hope this not very usefull example will help you out.&lt;BR /&gt;&lt;BR /&gt;J-P (Jean-Pierre)</description>
      <pubDate>Sat, 18 Sep 2004 06:23:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-schedule-the-work-in-every-two-hours/m-p/3381634#M14133</guid>
      <dc:creator>Huc_1</dc:creator>
      <dc:date>2004-09-18T06:23:06Z</dc:date>
    </item>
    <item>
      <title>Re: how to schedule the work in every two hours</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-schedule-the-work-in-every-two-hours/m-p/3381635#M14134</link>
      <description>Did it again ! should read my answer before sending then !&lt;BR /&gt;&lt;BR /&gt;In the crontab file the first lines should read&lt;BR /&gt;&lt;BR /&gt; /bin/df &lt;BR /&gt;&lt;BR /&gt;like in the last lines.&lt;BR /&gt;&lt;BR /&gt;Please No points for this reply !&lt;BR /&gt;&lt;BR /&gt;J-P (Jean-Pierre)</description>
      <pubDate>Sat, 18 Sep 2004 06:27:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-schedule-the-work-in-every-two-hours/m-p/3381635#M14134</guid>
      <dc:creator>Huc_1</dc:creator>
      <dc:date>2004-09-18T06:27:46Z</dc:date>
    </item>
    <item>
      <title>Re: how to schedule the work in every two hours</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-schedule-the-work-in-every-two-hours/m-p/3381636#M14135</link>
      <description>Frederick,&lt;BR /&gt;&lt;BR /&gt;Acording to the crontab (5) man page the crontab entry can be:&lt;BR /&gt;&lt;BR /&gt;0 0-23/2 * * * your2hourCommand&lt;BR /&gt;or&lt;BR /&gt;0 */2 * * * your2hourCommand&lt;BR /&gt;or&lt;BR /&gt;0 0,2,4,6,8,10,12,14,16,18,20,22  * * * your2hourCommand&lt;BR /&gt;&lt;BR /&gt;I tested all 3 variants on the first field  (minute) and they work.&lt;BR /&gt;&lt;BR /&gt;Dont forget to finish the line with a new line! It seems that cron ignore lines which are not terminated by a linefeed&lt;BR /&gt;&lt;BR /&gt;Bojan</description>
      <pubDate>Sat, 18 Sep 2004 07:01:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-schedule-the-work-in-every-two-hours/m-p/3381636#M14135</guid>
      <dc:creator>Bojan Nemec</dc:creator>
      <dc:date>2004-09-18T07:01:56Z</dc:date>
    </item>
    <item>
      <title>Re: how to schedule the work in every two hours</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-schedule-the-work-in-every-two-hours/m-p/3381637#M14136</link>
      <description>crontab entries can be defined to schedule work to be done in every two hours as,&lt;BR /&gt;&lt;BR /&gt;0 0,2,4,6,8,10,12,14,16,18,20,22 * * * &lt;COMMAND&gt; &lt;REDIRECTION&gt;&lt;BR /&gt;&lt;BR /&gt;where &lt;BR /&gt; first field indicates minute's &lt;BR /&gt; second one for hour setting&lt;BR /&gt; &lt;BR /&gt;Example:&lt;BR /&gt;0 0,2,4,6,8,10,12,14,16,18,20,22 * * * date 1&amp;gt; /tmp/date_check 2&amp;gt;&amp;amp;1&lt;BR /&gt;&lt;BR /&gt;* indicates that it will do in every day, every week-day and every month day's&lt;BR /&gt; &lt;BR /&gt;&lt;/REDIRECTION&gt;&lt;/COMMAND&gt;</description>
      <pubDate>Mon, 20 Sep 2004 00:32:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-schedule-the-work-in-every-two-hours/m-p/3381637#M14136</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2004-09-20T00:32:55Z</dc:date>
    </item>
    <item>
      <title>Re: how to schedule the work in every two hours</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-schedule-the-work-in-every-two-hours/m-p/3381638#M14137</link>
      <description>As long as linux cron has more features in time definition, the more easy way will be :&lt;BR /&gt;00 */2 * * * myjob&lt;BR /&gt;&lt;BR /&gt;It will then run at odd hours.&lt;BR /&gt;If you want it to run at even hours, use :&lt;BR /&gt;00 1-23/2 * * * myjob&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Fred&lt;BR /&gt;</description>
      <pubDate>Mon, 20 Sep 2004 04:04:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-schedule-the-work-in-every-two-hours/m-p/3381638#M14137</guid>
      <dc:creator>Fred Ruffet</dc:creator>
      <dc:date>2004-09-20T04:04:39Z</dc:date>
    </item>
    <item>
      <title>Re: how to schedule the work in every two hours</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-schedule-the-work-in-every-two-hours/m-p/3381639#M14138</link>
      <description>You can very well do the cronjob to be done for every 2 hours with the following entry in the cron list&lt;BR /&gt;Hello&lt;BR /&gt;Well you can do your job for every 2 hours using the cron.For this u can do the following in your command prompt:&lt;BR /&gt;&lt;BR /&gt;#crontab -e&lt;BR /&gt;* */2 * * *  /PATH/TO/COMMAND  &amp;gt; /dev/null 2&amp;gt;&amp;amp;1&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Now your job will be done for every 2 hours/&lt;BR /&gt;&lt;BR /&gt;More can be available at:&lt;BR /&gt;#man 5 crontab&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Senthil Murugan&lt;BR /&gt;</description>
      <pubDate>Tue, 21 Sep 2004 09:29:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-schedule-the-work-in-every-two-hours/m-p/3381639#M14138</guid>
      <dc:creator>Senthilmurugan</dc:creator>
      <dc:date>2004-09-21T09:29:14Z</dc:date>
    </item>
  </channel>
</rss>

