<?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: adding entry in cron in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/adding-entry-in-cron/m-p/4282368#M335652</link>
    <description>&amp;gt;Pete: The crontabs are stored in a plain text file located at /var/spool/cron/crontabs/&lt;BR /&gt;&amp;gt;It should be a relatively simple matter to set up a script that would echo the new entry, appending it to the various machine's crontabs.&lt;BR /&gt;&lt;BR /&gt;Do NOT do this!  cron has no idea you did this so it will NOT see the new entry.&lt;BR /&gt;&lt;BR /&gt;A better solution would be to use "crontab -l", then your echo, then "crontab file" to reread the new file.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;for SRVR in `cat server_list`&lt;BR /&gt;&lt;BR /&gt;And of course you remove evil cats by:&lt;BR /&gt;for SRVR in $(&amp;lt; server_list); do&lt;BR /&gt;&lt;BR /&gt;&amp;gt;JRF: # /sbin/init.d/cron stop&lt;BR /&gt;&lt;BR /&gt;That would be better but why not do the obvious and use crontab?</description>
    <pubDate>Tue, 07 Oct 2008 15:25:42 GMT</pubDate>
    <dc:creator>Dennis Handly</dc:creator>
    <dc:date>2008-10-07T15:25:42Z</dc:date>
    <item>
      <title>adding entry in cron</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/adding-entry-in-cron/m-p/4282364#M335648</link>
      <description>Hello People,&lt;BR /&gt;&lt;BR /&gt;I need to add a cronjob. Now I need to add this to over 600 servers.It would be difficult to login on each and every server and do a crontab -e and add the job.Do we have suggestion to append this new job on all the servers.</description>
      <pubDate>Tue, 07 Oct 2008 14:57:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/adding-entry-in-cron/m-p/4282364#M335648</guid>
      <dc:creator>Kwhite_1</dc:creator>
      <dc:date>2008-10-07T14:57:36Z</dc:date>
    </item>
    <item>
      <title>Re: adding entry in cron</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/adding-entry-in-cron/m-p/4282365#M335649</link>
      <description>The crontabs are stored in a plain text file located at /var/spool/cron/crontabs/user_name.&lt;BR /&gt;&lt;BR /&gt;It should be a relatively simple matter to set up a script that would echo the new entry, appending it to the various machine's crontabs.  Something like this:&lt;BR /&gt;&lt;BR /&gt;echo "00 05 * * 1 /opt/ignite/bin/check_recovery" &amp;gt;&amp;gt; /var/spool/cron/crontabs/root&lt;BR /&gt;&lt;BR /&gt;would do it.  Then you just need to figure out how to do that on all your servers.  Maybe a "for" loop?&lt;BR /&gt;&lt;BR /&gt;for SRVR in `cat server_list`&lt;BR /&gt;do&lt;BR /&gt;echo command here&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 07 Oct 2008 15:03:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/adding-entry-in-cron/m-p/4282365#M335649</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2008-10-07T15:03:43Z</dc:date>
    </item>
    <item>
      <title>Re: adding entry in cron</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/adding-entry-in-cron/m-p/4282366#M335650</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;You could 'ssh' or 'rsh' into your servers and then do (for example):&lt;BR /&gt;&lt;BR /&gt;# echo "* * * * * date" &amp;gt;&amp;gt; /var/spool/cron/crontabs/root&lt;BR /&gt;# /sbin/init.d/cron stop&lt;BR /&gt;# /sbin/init.d/cron start&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 07 Oct 2008 15:09:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/adding-entry-in-cron/m-p/4282366#M335650</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-10-07T15:09:56Z</dc:date>
    </item>
    <item>
      <title>Re: adding entry in cron</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/adding-entry-in-cron/m-p/4282367#M335651</link>
      <description>And don't forget to create a backup copy of the crontab file in case of script errors.&lt;BR /&gt;Multiplying error on 600 server will cost you lots of time.&lt;BR /&gt;First test your script on 1-2 server.&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;ivan</description>
      <pubDate>Tue, 07 Oct 2008 15:12:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/adding-entry-in-cron/m-p/4282367#M335651</guid>
      <dc:creator>Ivan Krastev</dc:creator>
      <dc:date>2008-10-07T15:12:52Z</dc:date>
    </item>
    <item>
      <title>Re: adding entry in cron</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/adding-entry-in-cron/m-p/4282368#M335652</link>
      <description>&amp;gt;Pete: The crontabs are stored in a plain text file located at /var/spool/cron/crontabs/&lt;BR /&gt;&amp;gt;It should be a relatively simple matter to set up a script that would echo the new entry, appending it to the various machine's crontabs.&lt;BR /&gt;&lt;BR /&gt;Do NOT do this!  cron has no idea you did this so it will NOT see the new entry.&lt;BR /&gt;&lt;BR /&gt;A better solution would be to use "crontab -l", then your echo, then "crontab file" to reread the new file.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;for SRVR in `cat server_list`&lt;BR /&gt;&lt;BR /&gt;And of course you remove evil cats by:&lt;BR /&gt;for SRVR in $(&amp;lt; server_list); do&lt;BR /&gt;&lt;BR /&gt;&amp;gt;JRF: # /sbin/init.d/cron stop&lt;BR /&gt;&lt;BR /&gt;That would be better but why not do the obvious and use crontab?</description>
      <pubDate>Tue, 07 Oct 2008 15:25:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/adding-entry-in-cron/m-p/4282368#M335652</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-10-07T15:25:42Z</dc:date>
    </item>
    <item>
      <title>Re: adding entry in cron</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/adding-entry-in-cron/m-p/4282369#M335653</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;I'm sorry, what in our answers didn't satisfactorily answer your question?&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 07 Oct 2008 15:26:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/adding-entry-in-cron/m-p/4282369#M335653</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-10-07T15:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: adding entry in cron</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/adding-entry-in-cron/m-p/4282370#M335654</link>
      <description>&lt;!--!*#--&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;perhaps a summary of all of the valuable answer will help Kwhite ...&lt;BR /&gt;&lt;BR /&gt;NB1: a plain 'remsh' command will read from stdin and that may have 'mysterious' impact for loops triggered by stdin ...&lt;BR /&gt;NB2: I'd keep the temporary files as a backup of the previous crontab entry.&lt;BR /&gt;&lt;BR /&gt;rem=ssh # or rem=remsh&lt;BR /&gt;for svr in ($&lt;SVRLIST&gt;&lt;/SVRLIST&gt;do&lt;BR /&gt;  print 'MM HH DD . . . cronentry' |&lt;BR /&gt;   $rem $svr '(crontab -l &amp;gt;/tmp/crt); cat /tmp/crt - | crontab'&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;mfG Peter</description>
      <pubDate>Wed, 08 Oct 2008 08:20:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/adding-entry-in-cron/m-p/4282370#M335654</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2008-10-08T08:20:38Z</dc:date>
    </item>
  </channel>
</rss>

