<?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 enable crontab for user only on active node? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-enable-crontab-for-user-only-on-active-node/m-p/3821504#M270153</link>
    <description>2 ways - either via a script in the custome defined start/end functions or, in cron itself - have it set to only execute if say a filesystem is mounted.&lt;BR /&gt;&lt;BR /&gt;I do the latter like so for example:&lt;BR /&gt;&lt;BR /&gt;# clean up old PCT data&lt;BR /&gt;30 5 * * * [ -d /oracle/PROD/920_64 ] &amp;amp;&amp;amp; /usr/local/bin/pct.clean &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;BR /&gt;&lt;BR /&gt;/oracle/PROD/920_64 does not exist on my inactive node, as /oracle/PROD is a mounted file system.&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff&lt;BR /&gt;</description>
    <pubDate>Tue, 11 Jul 2006 12:00:49 GMT</pubDate>
    <dc:creator>Geoff Wild</dc:creator>
    <dc:date>2006-07-11T12:00:49Z</dc:date>
    <item>
      <title>How to enable crontab for user only on active node?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-enable-crontab-for-user-only-on-active-node/m-p/3821499#M270148</link>
      <description>We have a setting where applications run active/failover by means of either VCS or HP/SG.&lt;BR /&gt;&lt;BR /&gt;With these, I would like to hear about ideas on how to make crontabjobs only to be active on the active nodes and therefore follow the application where it is active?  I am open to hear suggestions about solutions used in other places.&lt;BR /&gt;&lt;BR /&gt;This scenario is only on test systems as our production systems are not using cron but instead use an external batching mechanism that goes directly to the respective node to launch the jobs as required.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;MAD</description>
      <pubDate>Tue, 11 Jul 2006 11:30:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-enable-crontab-for-user-only-on-active-node/m-p/3821499#M270148</guid>
      <dc:creator>MAD_2</dc:creator>
      <dc:date>2006-07-11T11:30:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to enable crontab for user only on active node?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-enable-crontab-for-user-only-on-active-node/m-p/3821500#M270149</link>
      <description>You could easily add commands to the package to move around/copy around/rename the cron.allow file in /usr/lib/cron/cron.allow.&lt;BR /&gt;&lt;BR /&gt;This file controls who can run cron.  You could do whatever you need to the file when the package moves around.</description>
      <pubDate>Tue, 11 Jul 2006 11:39:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-enable-crontab-for-user-only-on-active-node/m-p/3821500#M270149</guid>
      <dc:creator>TwoProc</dc:creator>
      <dc:date>2006-07-11T11:39:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to enable crontab for user only on active node?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-enable-crontab-for-user-only-on-active-node/m-p/3821501#M270150</link>
      <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;build a script into the package that changes the the cron.allow and/or cron.deny list&lt;BR /&gt;&lt;BR /&gt;Or if you will permit the user editing priviledges then copy the schedule in /var/spool/cron back and forth from node to node. Again, this is best done in the package script.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Tue, 11 Jul 2006 11:45:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-enable-crontab-for-user-only-on-active-node/m-p/3821501#M270150</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2006-07-11T11:45:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to enable crontab for user only on active node?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-enable-crontab-for-user-only-on-active-node/m-p/3821502#M270151</link>
      <description>Rather than trying to have control scripts change crontabs on the fly, I find it much easier to run the same cron scripts on all potential adoptive hosts and to let the script itself determine if it should actually execute or exit immediately. I'll assume that your package has a volume group associated with it so your cron'ed scripts needs to check for the existence of a file under this VG.&lt;BR /&gt;&lt;BR /&gt;e.g.&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;&lt;BR /&gt;typeset CHEKFILE=/xxx/yyy/myfile.dat&lt;BR /&gt;typeset -i STAT=0&lt;BR /&gt;&lt;BR /&gt;if [[ -f "${CHEKFILE}" &amp;amp;&amp;amp; -r "${CHEKFILE}" ]]&lt;BR /&gt;  then&lt;BR /&gt;    echo "I'm the active node"&lt;BR /&gt;#   do your stuff here and set ${STAT}&lt;BR /&gt;#   to whatever you like; 0 =&amp;gt; ok&lt;BR /&gt;  fi&lt;BR /&gt;exit ${STAT}&lt;BR /&gt;&lt;BR /&gt;----------------------------&lt;BR /&gt;No crontabs have to be moved, nothing has to change. All you have to do is install the scripts and the appropriate crontab entry on all potential nodes and you are done.  &lt;BR /&gt;</description>
      <pubDate>Tue, 11 Jul 2006 11:46:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-enable-crontab-for-user-only-on-active-node/m-p/3821502#M270151</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2006-07-11T11:46:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to enable crontab for user only on active node?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-enable-crontab-for-user-only-on-active-node/m-p/3821503#M270152</link>
      <description>Although I sort of like this last approach, it's unconceivebly complex to attempt to change current scripts, since there are hundreds, potentially thousands, as the appllications are also too many.&lt;BR /&gt;&lt;BR /&gt;Each application has its own crontab (about 5-10 applications per each host).  Each application can have a crontab with about 1-50 jobs in it, so it's unfeasible to consider changing the scripts, as I also don't have control over them.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;MAD&lt;BR /&gt;</description>
      <pubDate>Tue, 11 Jul 2006 11:56:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-enable-crontab-for-user-only-on-active-node/m-p/3821503#M270152</guid>
      <dc:creator>MAD_2</dc:creator>
      <dc:date>2006-07-11T11:56:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to enable crontab for user only on active node?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-enable-crontab-for-user-only-on-active-node/m-p/3821504#M270153</link>
      <description>2 ways - either via a script in the custome defined start/end functions or, in cron itself - have it set to only execute if say a filesystem is mounted.&lt;BR /&gt;&lt;BR /&gt;I do the latter like so for example:&lt;BR /&gt;&lt;BR /&gt;# clean up old PCT data&lt;BR /&gt;30 5 * * * [ -d /oracle/PROD/920_64 ] &amp;amp;&amp;amp; /usr/local/bin/pct.clean &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;BR /&gt;&lt;BR /&gt;/oracle/PROD/920_64 does not exist on my inactive node, as /oracle/PROD is a mounted file system.&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff&lt;BR /&gt;</description>
      <pubDate>Tue, 11 Jul 2006 12:00:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-enable-crontab-for-user-only-on-active-node/m-p/3821504#M270153</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2006-07-11T12:00:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to enable crontab for user only on active node?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-enable-crontab-for-user-only-on-active-node/m-p/3821505#M270154</link>
      <description>Well, when you think of this after the fact then virtually any scheme is complex. This is the sort of thing that should have been designed on the front end. You are a victim of your own poor planning  --- or it is your job to clean up someone else's mess.&lt;BR /&gt;&lt;BR /&gt;When you mention thousands of scripts then this suggests an automated method of changing all the scripts. It should be rather easy to create a wrapper script that is called by cron that in turn calls your existing scripts or simply exits.</description>
      <pubDate>Tue, 11 Jul 2006 12:18:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-enable-crontab-for-user-only-on-active-node/m-p/3821505#M270154</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2006-07-11T12:18:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to enable crontab for user only on active node?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-enable-crontab-for-user-only-on-active-node/m-p/3821506#M270155</link>
      <description>I very much like your approach Geoff, and I think it may not be so extremely painful to implement... Unfortunately it is like case #2 mentioned by Clay:&lt;BR /&gt;"it is your job to clean up someone else's mess."&lt;BR /&gt;&lt;BR /&gt;Thanks... I'll leave this open for another couple of days and then close it, in case there are other bright suggestions floating around.&lt;BR /&gt;&lt;BR /&gt;This place is always an excellent start for great ideas.&lt;BR /&gt;&lt;BR /&gt;MAD</description>
      <pubDate>Tue, 11 Jul 2006 15:52:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-enable-crontab-for-user-only-on-active-node/m-p/3821506#M270155</guid>
      <dc:creator>MAD_2</dc:creator>
      <dc:date>2006-07-11T15:52:34Z</dc:date>
    </item>
  </channel>
</rss>

