<?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: application crons in 2 node cluster in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/application-crons-in-2-node-cluster/m-p/2485785#M716862</link>
    <description>Hi Dianne,&lt;BR /&gt;I think Brad`s suggestion is a good way. In our 2 node cluster i had the same problem. On every node several cron-jobs are to run. Since 1 year i use the attached script rip (run in package) and roh (run on host). The 2 crontabs are identical, I only edit the crontab file at the one node and do an rcp (by cron) once a day to the other node.&lt;BR /&gt;The script is very easy, so i think i do not have to translate the comments.&lt;BR /&gt;&lt;BR /&gt;sorry, i only can attach one file, so i'll cat rip roh &amp;gt;&amp;gt;rip+roh&lt;BR /&gt;Regards , Lothar&lt;BR /&gt;</description>
    <pubDate>Wed, 24 Jan 2001 08:25:25 GMT</pubDate>
    <dc:creator>Lothar Krueler</dc:creator>
    <dc:date>2001-01-24T08:25:25Z</dc:date>
    <item>
      <title>application crons in 2 node cluster</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/application-crons-in-2-node-cluster/m-p/2485782#M716859</link>
      <description>Does anyone have a recommendation for managing application crons?  Our app is running on only one server or the other, so we don't want cron running on the backup server.  Thanks!</description>
      <pubDate>Tue, 23 Jan 2001 20:14:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/application-crons-in-2-node-cluster/m-p/2485782#M716859</guid>
      <dc:creator>Dianne Dearring</dc:creator>
      <dc:date>2001-01-23T20:14:24Z</dc:date>
    </item>
    <item>
      <title>Re: application crons in 2 node cluster</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/application-crons-in-2-node-cluster/m-p/2485783#M716860</link>
      <description>Dianne,&lt;BR /&gt;I have had to create a solution to this, and I have all the pieces except the 'trigger' to invoke my script. Basically, I have written a script that does a crontab -l &amp;gt; file, rcp's that file to the backup server, starts cron on the backup server (using remsh), and then disables cron on the 'downed' server. Then the reverse happens once the 'downed' server comes back up.&lt;BR /&gt;Oh, and to disable cron, I am just submitting an empty crontab file.&lt;BR /&gt;Hope this helps,&lt;BR /&gt;Mo</description>
      <pubDate>Tue, 23 Jan 2001 20:38:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/application-crons-in-2-node-cluster/m-p/2485783#M716860</guid>
      <dc:creator>Maureen Gunkel</dc:creator>
      <dc:date>2001-01-23T20:38:32Z</dc:date>
    </item>
    <item>
      <title>Re: application crons in 2 node cluster</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/application-crons-in-2-node-cluster/m-p/2485784#M716861</link>
      <description>I was thinking about setting up a cron on our cluster but we decided to do it a different way.&lt;BR /&gt;&lt;BR /&gt;My thought was to setup the cron on both the servers. Inside the script run by cron I would check if the package was running on the server via cmviewcl or some other way. If the package was not running it would exit out of the script otherwise it would continue and run the script.</description>
      <pubDate>Tue, 23 Jan 2001 21:17:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/application-crons-in-2-node-cluster/m-p/2485784#M716861</guid>
      <dc:creator>BradF</dc:creator>
      <dc:date>2001-01-23T21:17:40Z</dc:date>
    </item>
    <item>
      <title>Re: application crons in 2 node cluster</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/application-crons-in-2-node-cluster/m-p/2485785#M716862</link>
      <description>Hi Dianne,&lt;BR /&gt;I think Brad`s suggestion is a good way. In our 2 node cluster i had the same problem. On every node several cron-jobs are to run. Since 1 year i use the attached script rip (run in package) and roh (run on host). The 2 crontabs are identical, I only edit the crontab file at the one node and do an rcp (by cron) once a day to the other node.&lt;BR /&gt;The script is very easy, so i think i do not have to translate the comments.&lt;BR /&gt;&lt;BR /&gt;sorry, i only can attach one file, so i'll cat rip roh &amp;gt;&amp;gt;rip+roh&lt;BR /&gt;Regards , Lothar&lt;BR /&gt;</description>
      <pubDate>Wed, 24 Jan 2001 08:25:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/application-crons-in-2-node-cluster/m-p/2485785#M716862</guid>
      <dc:creator>Lothar Krueler</dc:creator>
      <dc:date>2001-01-24T08:25:25Z</dc:date>
    </item>
    <item>
      <title>Re: application crons in 2 node cluster</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/application-crons-in-2-node-cluster/m-p/2485786#M716863</link>
      <description>Hi Dianne,&lt;BR /&gt;&lt;BR /&gt;I got curious about this.  Though it' not a ServiceGuard failing, others have asked about it.&lt;BR /&gt;&lt;BR /&gt;Maureen mentioned a 'trigger' to determine when to switch cron jobs.  I can't think of a good trigger.&lt;BR /&gt;&lt;BR /&gt;Brad's suggestion to use cron appealed to me.&lt;BR /&gt;&lt;BR /&gt;Here is a simple script cron can call that may help:&lt;BR /&gt;&lt;BR /&gt;#!/sbin/sh&lt;BR /&gt;#&lt;BR /&gt;# The purpose of this script is to demonstrate one way that&lt;BR /&gt;# the system can be programmed to determine if the local host&lt;BR /&gt;# should be cron'd to run special instructions based on whether&lt;BR /&gt;# a ServiceGuard package is running on the local host.&lt;BR /&gt;#&lt;BR /&gt;&lt;BR /&gt;P_NAME=aclk  &amp;lt;-- (put your package name here)&lt;BR /&gt;PKG_LOC=`cmviewcl -p $P_NAME | grep $P_NAME | awk '{print $5}'`&lt;BR /&gt;HOST=`uname -n`&lt;BR /&gt;if [[ $PKG_LOC != $HOST ]]&lt;BR /&gt;then /usr/bin/crontab /root/cron/std_crontab&lt;BR /&gt;else /usr/bin/crontab /root/cron/pkg_crontab&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;# pkg_crontab contains everything in std_crontab plus extra commands</description>
      <pubDate>Wed, 07 Feb 2001 17:10:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/application-crons-in-2-node-cluster/m-p/2485786#M716863</guid>
      <dc:creator>Stephen Doud</dc:creator>
      <dc:date>2001-02-07T17:10:22Z</dc:date>
    </item>
    <item>
      <title>Re: application crons in 2 node cluster</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/application-crons-in-2-node-cluster/m-p/2485787#M716864</link>
      <description>This one hooked me :)&lt;BR /&gt;I created UXSGKBQA00000066 describing one way to implement matching cron jobs to package location.&lt;BR /&gt;&lt;BR /&gt;Hope it helps.&lt;BR /&gt;&lt;BR /&gt;-Stephen</description>
      <pubDate>Fri, 09 Feb 2001 14:51:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/application-crons-in-2-node-cluster/m-p/2485787#M716864</guid>
      <dc:creator>Stephen Doud</dc:creator>
      <dc:date>2001-02-09T14:51:06Z</dc:date>
    </item>
    <item>
      <title>Re: application crons in 2 node cluster</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/application-crons-in-2-node-cluster/m-p/2485788#M716865</link>
      <description>Changing the crontab file looks like it would work fine. But my thought was to change the script that is called by cron. If the PKG is not running on the server the script would exit gracefully.&lt;BR /&gt;&lt;BR /&gt;# Script to run on Server if PKG is running&lt;BR /&gt;PKG=&lt;YOUR package="" name=""&gt;&lt;BR /&gt;PKG_LOC=`cmviewcl -p $PKG | grep $PKG | awk '{print $5}'`&lt;BR /&gt;HOST=`uname -n`&lt;BR /&gt;&lt;BR /&gt;if [[ $PKG_LOC != $HOST ]]; then&lt;BR /&gt;exit&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;# run cmds on server.&lt;BR /&gt;&lt;BR /&gt;This can be implemented without changing Service Guard, testing failover and creating two crontab files for each server.&lt;/YOUR&gt;</description>
      <pubDate>Fri, 09 Feb 2001 18:03:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/application-crons-in-2-node-cluster/m-p/2485788#M716865</guid>
      <dc:creator>BradF</dc:creator>
      <dc:date>2001-02-09T18:03:54Z</dc:date>
    </item>
    <item>
      <title>Re: application crons in 2 node cluster</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/application-crons-in-2-node-cluster/m-p/2485789#M716866</link>
      <description>Dianne,  &lt;BR /&gt;&lt;BR /&gt;If you are handing out points - give them to Brad for his elegant approach! &lt;BR /&gt;&lt;BR /&gt;Brad, if you don't mind, I'll replace my document with your idea!&lt;BR /&gt;&lt;BR /&gt;-Stephen</description>
      <pubDate>Tue, 13 Feb 2001 22:15:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/application-crons-in-2-node-cluster/m-p/2485789#M716866</guid>
      <dc:creator>Stephen Doud</dc:creator>
      <dc:date>2001-02-13T22:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: application crons in 2 node cluster</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/application-crons-in-2-node-cluster/m-p/2485790#M716867</link>
      <description>Another way we handled cron was to put the master cron for the application in their file system (provided it moves with the package).  The trigger is the package halt and start.  On the halt a crontab -r for that application id is executed. On the startup of "crontab filename appl_id" is run where the filename is the master cron file for the application in their agreed upon location.&lt;BR /&gt;Sorry I don't have the script for this - took an early retirement and didn't have time to get all my scripts...&lt;BR /&gt;&lt;BR /&gt;This only works with a unique application-id that moves from node to node.&lt;BR /&gt;&lt;BR /&gt;Peggy</description>
      <pubDate>Thu, 08 Mar 2001 03:43:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/application-crons-in-2-node-cluster/m-p/2485790#M716867</guid>
      <dc:creator>Peggy Fong</dc:creator>
      <dc:date>2001-03-08T03:43:24Z</dc:date>
    </item>
  </channel>
</rss>

