<?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: Who can help me about how to use &amp;quot;crontab&amp;quot; command in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/who-can-help-me-about-how-to-use-quot-crontab-quot-command/m-p/2659398#M47841</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;One further thought. To edit your crontab&lt;BR /&gt;correctly use this example, as root.&lt;BR /&gt;&lt;BR /&gt;# crontab -l &amp;gt;/tmp/wrk1&lt;BR /&gt;Make your changes and save the file&lt;BR /&gt;&lt;BR /&gt;# crontab /tmp/wrk1&lt;BR /&gt;&lt;BR /&gt;Never use crontab -e as it is a recipe for&lt;BR /&gt;disaster.&lt;BR /&gt;&lt;BR /&gt;Use the man pages as a further guide.&lt;BR /&gt;&lt;BR /&gt;man cron (explanations of the minutes, hours etc. &lt;BR /&gt;man crontab&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;-Michael</description>
    <pubDate>Wed, 06 Feb 2002 02:53:35 GMT</pubDate>
    <dc:creator>Michael Tully</dc:creator>
    <dc:date>2002-02-06T02:53:35Z</dc:date>
    <item>
      <title>Who can help me about how to use "crontab" command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/who-can-help-me-about-how-to-use-quot-crontab-quot-command/m-p/2659395#M47838</link>
      <description>Hi, My friend told me that HP-UX can do some job at one assigned time. I can do it. For example, I has wrote it:&lt;BR /&gt;#M H D M Y CMD&lt;BR /&gt;15 * * * * echo 'Woohoo, spring is here!'&lt;BR /&gt;My question is :&lt;BR /&gt;This job need be run four times at each hour, who can help me how to write the crontab file?</description>
      <pubDate>Wed, 06 Feb 2002 02:26:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/who-can-help-me-about-how-to-use-quot-crontab-quot-command/m-p/2659395#M47838</guid>
      <dc:creator>zocmiu</dc:creator>
      <dc:date>2002-02-06T02:26:06Z</dc:date>
    </item>
    <item>
      <title>Re: Who can help me about how to use "crontab" command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/who-can-help-me-about-how-to-use-quot-crontab-quot-command/m-p/2659396#M47839</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;All you need to do is place a comma after each&lt;BR /&gt;entry for the minutes.&lt;BR /&gt;&lt;BR /&gt;For example you wanted to run a job at 15&lt;BR /&gt;minute intervals, at 1 minute past the hour &lt;BR /&gt;and again at 16 31 and 46 this is all you do.&lt;BR /&gt;&lt;BR /&gt;1,16,31,46 * * * * /usr/local/bin/myjob&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;-Michael</description>
      <pubDate>Wed, 06 Feb 2002 02:32:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/who-can-help-me-about-how-to-use-quot-crontab-quot-command/m-p/2659396#M47839</guid>
      <dc:creator>Michael Tully</dc:creator>
      <dc:date>2002-02-06T02:32:11Z</dc:date>
    </item>
    <item>
      <title>Re: Who can help me about how to use "crontab" command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/who-can-help-me-about-how-to-use-quot-crontab-quot-command/m-p/2659397#M47840</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;You can indicate the time you want in the all the field of time, eg.&lt;BR /&gt;&lt;BR /&gt;If I want to run a job (in crontab) 4 times an hour, 4 times a day, I can specify that like this:&lt;BR /&gt;&lt;BR /&gt;0,15,30,45 09,12,15,18 * * * &lt;COMMAND&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;Kenny.&lt;/COMMAND&gt;</description>
      <pubDate>Wed, 06 Feb 2002 02:51:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/who-can-help-me-about-how-to-use-quot-crontab-quot-command/m-p/2659397#M47840</guid>
      <dc:creator>Kenny Chau</dc:creator>
      <dc:date>2002-02-06T02:51:55Z</dc:date>
    </item>
    <item>
      <title>Re: Who can help me about how to use "crontab" command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/who-can-help-me-about-how-to-use-quot-crontab-quot-command/m-p/2659398#M47841</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;One further thought. To edit your crontab&lt;BR /&gt;correctly use this example, as root.&lt;BR /&gt;&lt;BR /&gt;# crontab -l &amp;gt;/tmp/wrk1&lt;BR /&gt;Make your changes and save the file&lt;BR /&gt;&lt;BR /&gt;# crontab /tmp/wrk1&lt;BR /&gt;&lt;BR /&gt;Never use crontab -e as it is a recipe for&lt;BR /&gt;disaster.&lt;BR /&gt;&lt;BR /&gt;Use the man pages as a further guide.&lt;BR /&gt;&lt;BR /&gt;man cron (explanations of the minutes, hours etc. &lt;BR /&gt;man crontab&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;-Michael</description>
      <pubDate>Wed, 06 Feb 2002 02:53:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/who-can-help-me-about-how-to-use-quot-crontab-quot-command/m-p/2659398#M47841</guid>
      <dc:creator>Michael Tully</dc:creator>
      <dc:date>2002-02-06T02:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: Who can help me about how to use "crontab" command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/who-can-help-me-about-how-to-use-quot-crontab-quot-command/m-p/2659399#M47842</link>
      <description>Hi,&lt;BR /&gt;A point to note: cron jobs are not associated with any particular terminal. Cron is normally used for non-interactive, background processes.&lt;BR /&gt;So don't be surprised if you don't see 'Woohoo, spring is here!' on your screen every 15 minutes. You will have more luck if you redirect the output like so - echo 'Woohoo, spring is here!' &amp;gt;&amp;gt; /tmp/cron_output&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 06 Feb 2002 03:19:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/who-can-help-me-about-how-to-use-quot-crontab-quot-command/m-p/2659399#M47842</guid>
      <dc:creator>Deepak Extross</dc:creator>
      <dc:date>2002-02-06T03:19:44Z</dc:date>
    </item>
    <item>
      <title>Re: Who can help me about how to use "crontab" command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/who-can-help-me-about-how-to-use-quot-crontab-quot-command/m-p/2659400#M47843</link>
      <description>Thanks yours heartly answer.&lt;BR /&gt;However, if i want to run my job each three mintues, has some more good method? Can it be use like it: ( of course it is not right in HP-UX, this is only an idea )&lt;BR /&gt;#M  H D M Y CMD&lt;BR /&gt;*/3 * * * * date&lt;BR /&gt;In fact, I need more complex. My job is first start at 18 mintue, then need start after each 15 mintue later.&lt;BR /&gt;I need your more help.&lt;BR /&gt;Thanx.</description>
      <pubDate>Wed, 06 Feb 2002 04:30:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/who-can-help-me-about-how-to-use-quot-crontab-quot-command/m-p/2659400#M47843</guid>
      <dc:creator>zocmiu</dc:creator>
      <dc:date>2002-02-06T04:30:04Z</dc:date>
    </item>
    <item>
      <title>Re: Who can help me about how to use "crontab" command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/who-can-help-me-about-how-to-use-quot-crontab-quot-command/m-p/2659401#M47844</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;You can start the job as many times as you wish.&lt;BR /&gt;All you need to is to place a comma after each &lt;BR /&gt;minute entry. You can run the same job every&lt;BR /&gt;minute if you wish.&lt;BR /&gt;&lt;BR /&gt;e.g. A job every 3 minutes&lt;BR /&gt;&lt;BR /&gt;0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57 * * * * /usr/local/bin/myjob&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;-Michael</description>
      <pubDate>Wed, 06 Feb 2002 04:46:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/who-can-help-me-about-how-to-use-quot-crontab-quot-command/m-p/2659401#M47844</guid>
      <dc:creator>Michael Tully</dc:creator>
      <dc:date>2002-02-06T04:46:18Z</dc:date>
    </item>
    <item>
      <title>Re: Who can help me about how to use "crontab" command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/who-can-help-me-about-how-to-use-quot-crontab-quot-command/m-p/2659402#M47845</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; In fact, I need more complex. My job is first start at 18 mintue, then need start after each 15 mintue later. &lt;BR /&gt;&lt;BR /&gt;Instead of using cron, you can use a nohup script job in the background:&lt;BR /&gt;&lt;BR /&gt;# nohup my_job &amp;amp;&lt;BR /&gt;&lt;BR /&gt;In your my_job script,&lt;BR /&gt;=====================================&lt;BR /&gt;#!/sbin/sh&lt;BR /&gt;&lt;BR /&gt;# This will wait for 18 mins before running the initial task perform_initial_task.&lt;BR /&gt;&lt;BR /&gt;sleep `expr 18 \* 60`&lt;BR /&gt;perform_initial_task&lt;BR /&gt;&lt;BR /&gt;# This will wait for 15 mins from the completion endtime of perform_initial_task before running perform_periodic_task which proceeds to run every 15 mins (from the completion endtime of the last execution).&lt;BR /&gt;&lt;BR /&gt;while sleep `expr 15 \* 60`&lt;BR /&gt;do&lt;BR /&gt;  perform_periodic_task&lt;BR /&gt;done&lt;BR /&gt;=====================================&lt;BR /&gt;Hope this helps. Regards.&lt;BR /&gt;&lt;BR /&gt;Steven Sim Kok Leong</description>
      <pubDate>Wed, 06 Feb 2002 04:56:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/who-can-help-me-about-how-to-use-quot-crontab-quot-command/m-p/2659402#M47845</guid>
      <dc:creator>Steven Sim Kok Leong</dc:creator>
      <dc:date>2002-02-06T04:56:24Z</dc:date>
    </item>
    <item>
      <title>Re: Who can help me about how to use "crontab" command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/who-can-help-me-about-how-to-use-quot-crontab-quot-command/m-p/2659403#M47846</link>
      <description>Hi, Steven Sim Kok Leong:&lt;BR /&gt;    thanks a lot.</description>
      <pubDate>Thu, 07 Feb 2002 04:29:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/who-can-help-me-about-how-to-use-quot-crontab-quot-command/m-p/2659403#M47846</guid>
      <dc:creator>zocmiu</dc:creator>
      <dc:date>2002-02-07T04:29:35Z</dc:date>
    </item>
    <item>
      <title>Re: Who can help me about how to use "crontab" command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/who-can-help-me-about-how-to-use-quot-crontab-quot-command/m-p/2659404#M47847</link>
      <description>I had an alternate solution. If you want to run the job forever, you can use "at" command. If you want to run it daily, you need to use a counter in the script that Steven provided so that it will stop in a period of time. eg.&lt;BR /&gt;&lt;BR /&gt;perform_initial_task&lt;BR /&gt;counter=1&lt;BR /&gt;while [ $counter -le 40 ]  # stop in 10 hours&lt;BR /&gt;do&lt;BR /&gt;   sleep `expr 15 \* 60` &lt;BR /&gt;   perform_periodic_task&lt;BR /&gt;   (( counter = counter + 1 ))&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;If you want to start the job at 9:18am daily, you can use crontab job:&lt;BR /&gt;18 09 * * * script&lt;BR /&gt;&lt;BR /&gt;No need to give points to me, I just get this from Steven's reply.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Kenny.</description>
      <pubDate>Thu, 07 Feb 2002 04:49:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/who-can-help-me-about-how-to-use-quot-crontab-quot-command/m-p/2659404#M47847</guid>
      <dc:creator>Kenny Chau</dc:creator>
      <dc:date>2002-02-07T04:49:12Z</dc:date>
    </item>
  </channel>
</rss>

