<?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 Run the process in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/run-the-process/m-p/3690818#M247136</link>
    <description>In my server , there is a process need to keep on running , this processs may take 5-10 mins to run ( depends the situation ) , if I add a cron to run this job in every 5 mins ( eg. */5 ) , there will be two duplicate process in the system , if add a cron to run in every 10 mins , then there may be no job is running for 5 mins , is it possible to make sure the job is running but don't have a duplicate job ? thx&lt;BR /&gt;</description>
    <pubDate>Wed, 14 Dec 2005 00:39:18 GMT</pubDate>
    <dc:creator>hanyyu1</dc:creator>
    <dc:date>2005-12-14T00:39:18Z</dc:date>
    <item>
      <title>Run the process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/run-the-process/m-p/3690818#M247136</link>
      <description>In my server , there is a process need to keep on running , this processs may take 5-10 mins to run ( depends the situation ) , if I add a cron to run this job in every 5 mins ( eg. */5 ) , there will be two duplicate process in the system , if add a cron to run in every 10 mins , then there may be no job is running for 5 mins , is it possible to make sure the job is running but don't have a duplicate job ? thx&lt;BR /&gt;</description>
      <pubDate>Wed, 14 Dec 2005 00:39:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/run-the-process/m-p/3690818#M247136</guid>
      <dc:creator>hanyyu1</dc:creator>
      <dc:date>2005-12-14T00:39:18Z</dc:date>
    </item>
    <item>
      <title>Re: Run the process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/run-the-process/m-p/3690819#M247137</link>
      <description>Why not?? Run job through cron every 10 minutes. The script first should check if another instance of job is running or not. If running, it will not run another instance and if not running it will start one.&lt;BR /&gt;&lt;BR /&gt;Following code will do that.&lt;BR /&gt;&lt;BR /&gt;job_status=$(UNIX95= ps -C"process_name"|wc -l)&lt;BR /&gt;&lt;BR /&gt;if [[ ${job_status} -gt 0 ]]&lt;BR /&gt;then&lt;BR /&gt;"start_your_job"&lt;BR /&gt;else&lt;BR /&gt;exit #not starting the job&lt;BR /&gt;fi&lt;BR /&gt;</description>
      <pubDate>Wed, 14 Dec 2005 00:50:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/run-the-process/m-p/3690819#M247137</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2005-12-14T00:50:55Z</dc:date>
    </item>
    <item>
      <title>Re: Run the process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/run-the-process/m-p/3690820#M247138</link>
      <description>You can leave cron idea here.&lt;BR /&gt;&lt;BR /&gt;Start a process and check for process completion with it's PID using ps command. Start again once it is completed.&lt;BR /&gt;&lt;BR /&gt;./process &amp;amp;&lt;BR /&gt;pid=$!;&lt;BR /&gt;&lt;BR /&gt;check with this $pid variable using while loop.&lt;BR /&gt;&lt;BR /&gt;-Muthu&lt;BR /&gt;</description>
      <pubDate>Wed, 14 Dec 2005 01:44:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/run-the-process/m-p/3690820#M247138</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-12-14T01:44:12Z</dc:date>
    </item>
    <item>
      <title>Re: Run the process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/run-the-process/m-p/3690821#M247139</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;there is also the possibility to use the script itself to reschedule itself using the "at" command. See man at&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;e.g. &lt;BR /&gt;&lt;BR /&gt;echo "$util/yourscript.sh"|at `&amp;lt;&lt;CODE that="" evaulates="" current="" time=""&gt; /dev/null&lt;BR /&gt;&lt;BR /&gt;so that it gives something like:&lt;BR /&gt;echo "$util/yourscript.sh"|at 8:00am &amp;gt; /dev/null&lt;BR /&gt;&lt;BR /&gt;hope this helps too!&lt;BR /&gt;&lt;BR /&gt;kind regards&lt;BR /&gt;yogeeraj&lt;/CODE&gt;</description>
      <pubDate>Wed, 14 Dec 2005 01:50:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/run-the-process/m-p/3690821#M247139</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2005-12-14T01:50:35Z</dc:date>
    </item>
    <item>
      <title>Re: Run the process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/run-the-process/m-p/3690822#M247140</link>
      <description>Hi hanyyu1&lt;BR /&gt;&lt;BR /&gt;What about an inittab(4) entry for this?&lt;BR /&gt;&lt;BR /&gt;Then init(1) will observe that process and respawn a new one when the old one termiates.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;rgds &lt;BR /&gt;HGH&lt;BR /&gt;</description>
      <pubDate>Wed, 14 Dec 2005 03:04:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/run-the-process/m-p/3690822#M247140</guid>
      <dc:creator>Hemmetter</dc:creator>
      <dc:date>2005-12-14T03:04:25Z</dc:date>
    </item>
  </channel>
</rss>

