<?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: Cron Reboot Script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-reboot-script/m-p/2911845#M933458</link>
    <description>Ron,&lt;BR /&gt;&lt;BR /&gt;Have a look at my first reply.  Go to that thread and then go to A. Clay's response in that thread.  The caljd.sh script is attached to his response.</description>
    <pubDate>Mon, 24 Feb 2003 19:48:33 GMT</pubDate>
    <dc:creator>Patrick Wallek</dc:creator>
    <dc:date>2003-02-24T19:48:33Z</dc:date>
    <item>
      <title>Cron Reboot Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-reboot-script/m-p/2911829#M933442</link>
      <description>I have been tasked with having our HP-UX servers rebooted every 28th day at 5:30am.  I haven't been able to locate a utility that will convert the date to Julian format.  Is this utility available or is there a script out there that will do the job?</description>
      <pubDate>Mon, 24 Feb 2003 19:03:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-reboot-script/m-p/2911829#M933442</guid>
      <dc:creator>Ronald Angel</dc:creator>
      <dc:date>2003-02-24T19:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: Cron Reboot Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-reboot-script/m-p/2911830#M933443</link>
      <description>Hi&lt;BR /&gt;If you want to run any command every 28th hust add the following line to the crontab:&lt;BR /&gt;30 5 28 * * command&lt;BR /&gt;&lt;BR /&gt;-Tomek</description>
      <pubDate>Mon, 24 Feb 2003 19:07:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-reboot-script/m-p/2911830#M933443</guid>
      <dc:creator>Tomek Gryszkiewicz</dc:creator>
      <dc:date>2003-02-24T19:07:55Z</dc:date>
    </item>
    <item>
      <title>Re: Cron Reboot Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-reboot-script/m-p/2911831#M933444</link>
      <description>Have a look at this thread:&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x9e2631ec5e34d711abdc0090277a778c,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x9e2631ec5e34d711abdc0090277a778c,00.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Scroll down to A. Clay Stephensons reply and grab his attached script, caljd.sh.  That script is fast becoming the Forums standard for working with dates.</description>
      <pubDate>Mon, 24 Feb 2003 19:08:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-reboot-script/m-p/2911831#M933444</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2003-02-24T19:08:17Z</dc:date>
    </item>
    <item>
      <title>Re: Cron Reboot Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-reboot-script/m-p/2911832#M933445</link>
      <description>Hi Ron,&lt;BR /&gt;&lt;BR /&gt;Search the forum for  caljd.sh or caljd.pl.&lt;BR /&gt;This is Clay's excellent date hammer. This will do it for you.&lt;BR /&gt;&lt;BR /&gt;Rgds,&lt;BR /&gt;Jeff</description>
      <pubDate>Mon, 24 Feb 2003 19:08:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-reboot-script/m-p/2911832#M933445</guid>
      <dc:creator>Jeff Schussele</dc:creator>
      <dc:date>2003-02-24T19:08:18Z</dc:date>
    </item>
    <item>
      <title>Re: Cron Reboot Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-reboot-script/m-p/2911833#M933446</link>
      <description>Thank you all for such a quick response.  I will give the first one a try and go from there. I'll be back with my results.  Thank you all again.</description>
      <pubDate>Mon, 24 Feb 2003 19:10:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-reboot-script/m-p/2911833#M933446</guid>
      <dc:creator>Ronald Angel</dc:creator>
      <dc:date>2003-02-24T19:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: Cron Reboot Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-reboot-script/m-p/2911834#M933447</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I wonder why you would want to reboot the servers everymonth. You do not need to do it.&lt;BR /&gt;&lt;BR /&gt;If it is insisted by the management (sometimes we can't help) then write a script that will shutdown the application. Something like this.&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/ksh&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;command_to_stop_apps&lt;BR /&gt;if [ $? = 0 ]&lt;BR /&gt;then&lt;BR /&gt;/usr/sbin/shutdown -r now&lt;BR /&gt;else&lt;BR /&gt;echo "Application is not down" |mailx -s "${hostname) not rebooted" your_address&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;Call this monthly_reboot.sh&lt;BR /&gt;&lt;BR /&gt;Place an entry&lt;BR /&gt;&lt;BR /&gt;30 05 28 * * /wherever/monthly_reboot.sh&lt;BR /&gt;&lt;BR /&gt;into your root's cronjobs.&lt;BR /&gt;&lt;BR /&gt;This will run the script every month on 28th at 5:30 AM.&lt;BR /&gt;&lt;BR /&gt;-Sri&lt;BR /&gt;</description>
      <pubDate>Mon, 24 Feb 2003 19:11:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-reboot-script/m-p/2911834#M933447</guid>
      <dc:creator>Sridhar Bhaskarla</dc:creator>
      <dc:date>2003-02-24T19:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: Cron Reboot Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-reboot-script/m-p/2911835#M933448</link>
      <description>Hi Ron,&lt;BR /&gt;&lt;BR /&gt;That first response will run the command on the 28th of every month - not every 28 days. Use Clay's script to do it every 28 days. Believe you just need to run caljd.sh -u  for usage notes.&lt;BR /&gt;&lt;BR /&gt;Rgds,&lt;BR /&gt;Jeff</description>
      <pubDate>Mon, 24 Feb 2003 19:12:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-reboot-script/m-p/2911835#M933448</guid>
      <dc:creator>Jeff Schussele</dc:creator>
      <dc:date>2003-02-24T19:12:15Z</dc:date>
    </item>
    <item>
      <title>Re: Cron Reboot Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-reboot-script/m-p/2911836#M933449</link>
      <description>Hi Ron:&lt;BR /&gt;&lt;BR /&gt;If "every 28 days" indeed means every 28th day increment as Jeff suggests, one way to accomodate this is to leverage 'at' with the "next timeunit" specification:&lt;BR /&gt;&lt;BR /&gt;# at -f job-file time [date] [next timeunit|+count timeunit]&lt;BR /&gt;&lt;BR /&gt;Thus, when your script runs, the last thing *it* does is to issue an 'at' request thereby rescheduling itself.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 24 Feb 2003 19:19:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-reboot-script/m-p/2911836#M933449</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2003-02-24T19:19:44Z</dc:date>
    </item>
    <item>
      <title>Re: Cron Reboot Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-reboot-script/m-p/2911837#M933450</link>
      <description>While I think rebooting every 28 days is state of the art dumb. Here is how to do it with a cron script set to run 0530 everyday.&lt;BR /&gt;&lt;BR /&gt;#Set GOOD_DAY between 0 and 27&lt;BR /&gt;&lt;BR /&gt;GOOD_DAY=7&lt;BR /&gt;if [[ $(($(caljd.sh) % 28)) -eq ${GOOD_DAY} ]]&lt;BR /&gt;  then&lt;BR /&gt;    echo "Do your thing"&lt;BR /&gt;  else&lt;BR /&gt;    exit 0&lt;BR /&gt;  fi&lt;BR /&gt;</description>
      <pubDate>Mon, 24 Feb 2003 19:20:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-reboot-script/m-p/2911837#M933450</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2003-02-24T19:20:45Z</dc:date>
    </item>
    <item>
      <title>Re: Cron Reboot Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-reboot-script/m-p/2911838#M933451</link>
      <description>I'll add additional info that I omitted from the inital question.  Management wants the servers rebooted every 28 days starting at a specific date for each server.  The first server reboot is set for tomorrow.  Management (Windows guy) thinks that they should all be rebooted at least once a month and wants it automated.  I intend on using the highly touted caljd.sh script you are all raving about and will pass it to my co-worker.  I'm also going to utilize the /sbin/reboot script provided in HP-UX11.  I didn't have much luck running the shutdown command via a cron script.  Thank you all again.</description>
      <pubDate>Mon, 24 Feb 2003 19:22:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-reboot-script/m-p/2911838#M933451</guid>
      <dc:creator>Ronald Angel</dc:creator>
      <dc:date>2003-02-24T19:22:45Z</dc:date>
    </item>
    <item>
      <title>Re: Cron Reboot Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-reboot-script/m-p/2911839#M933452</link>
      <description>A Micro$oft guy, huh?&lt;BR /&gt;THAT explains a lot.....&lt;BR /&gt;&lt;BR /&gt;Later,&lt;BR /&gt;Jeff</description>
      <pubDate>Mon, 24 Feb 2003 19:24:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-reboot-script/m-p/2911839#M933452</guid>
      <dc:creator>Jeff Schussele</dc:creator>
      <dc:date>2003-02-24T19:24:43Z</dc:date>
    </item>
    <item>
      <title>Re: Cron Reboot Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-reboot-script/m-p/2911840#M933453</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Your Windows management guy wants you to reboot every 28 days because that is what he has to do to keep his Windows servers running, right?&lt;BR /&gt;&lt;BR /&gt;Show him this:&lt;BR /&gt;&lt;BR /&gt;  1:25pm  up 1150 days,  1:41,  0 users,  load average: 0.07, 0.07, 0.07&lt;BR /&gt;&lt;BR /&gt;It is the actual uptime from one of our HP-UX servers.  It hasn't been down for over three years now.    &lt;BR /&gt;&lt;BR /&gt;Next, he'll probably want you to automate the daylight savings time change.  We can help you with that one too!  ;)&lt;BR /&gt;&lt;BR /&gt;JP&lt;BR /&gt;</description>
      <pubDate>Mon, 24 Feb 2003 19:27:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-reboot-script/m-p/2911840#M933453</guid>
      <dc:creator>John Poff</dc:creator>
      <dc:date>2003-02-24T19:27:45Z</dc:date>
    </item>
    <item>
      <title>Re: Cron Reboot Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-reboot-script/m-p/2911841#M933454</link>
      <description>Hey JP,&lt;BR /&gt;&lt;BR /&gt;Anybody ever question the patch level of that server?&lt;BR /&gt;What do you tell them - that you're trying to set a record?&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Jeff (UPTIME, baby...that's what we're talking about!)</description>
      <pubDate>Mon, 24 Feb 2003 19:34:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-reboot-script/m-p/2911841#M933454</guid>
      <dc:creator>Jeff Schussele</dc:creator>
      <dc:date>2003-02-24T19:34:40Z</dc:date>
    </item>
    <item>
      <title>Re: Cron Reboot Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-reboot-script/m-p/2911842#M933455</link>
      <description>Jeff,&lt;BR /&gt;&lt;BR /&gt;There are two schools of thought on patching:&lt;BR /&gt;&lt;BR /&gt;1. Patch it regularly.&lt;BR /&gt;&lt;BR /&gt;2. Don't patch anything unless it is broken.&lt;BR /&gt;&lt;BR /&gt;I'm in the first school, but this server is halfway across the country, and as long as it runs fine I don't want to mess with it.  Besides, everytime our Windows guys start giving me a hard time here I just e-mail them the latest 'uptime' from that server and ask them, "Got Unix?"&lt;BR /&gt;&lt;BR /&gt;Besides, remember that scene from "Blazing Saddles"?&lt;BR /&gt;&lt;BR /&gt;"Patches?  We don't need no steeenking patches!!"  :)&lt;BR /&gt;&lt;BR /&gt;JP&lt;BR /&gt;</description>
      <pubDate>Mon, 24 Feb 2003 19:39:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-reboot-script/m-p/2911842#M933455</guid>
      <dc:creator>John Poff</dc:creator>
      <dc:date>2003-02-24T19:39:41Z</dc:date>
    </item>
    <item>
      <title>Re: Cron Reboot Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-reboot-script/m-p/2911843#M933456</link>
      <description>THank you all again.... I agree with Clay's statement regarding "state of the art".  Where may I download this caljd.sh script?</description>
      <pubDate>Mon, 24 Feb 2003 19:44:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-reboot-script/m-p/2911843#M933456</guid>
      <dc:creator>Ronald Angel</dc:creator>
      <dc:date>2003-02-24T19:44:26Z</dc:date>
    </item>
    <item>
      <title>Re: Cron Reboot Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-reboot-script/m-p/2911844#M933457</link>
      <description>JP,&lt;BR /&gt;&lt;BR /&gt;Yep, I hear ya.&lt;BR /&gt;If I were you though, NEXT time it has to be rebooted, I'd have a replacement drive or two handy - just in case. Definitely, if it has to be power cycled.&lt;BR /&gt;&lt;BR /&gt;Yea, that a funny line. Think it was first heard in an old John Wayne movie - Rio Lobo or Rio Bravo, I think.&lt;BR /&gt;"Badges?!?! We don't need no stinking badges!"&lt;BR /&gt;&lt;BR /&gt;One of my favorites is in Three Amigos, I think, where these decrepit bandits are bandying about the term plethora - it's funny as hell.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Jeff</description>
      <pubDate>Mon, 24 Feb 2003 19:46:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-reboot-script/m-p/2911844#M933457</guid>
      <dc:creator>Jeff Schussele</dc:creator>
      <dc:date>2003-02-24T19:46:44Z</dc:date>
    </item>
    <item>
      <title>Re: Cron Reboot Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-reboot-script/m-p/2911845#M933458</link>
      <description>Ron,&lt;BR /&gt;&lt;BR /&gt;Have a look at my first reply.  Go to that thread and then go to A. Clay's response in that thread.  The caljd.sh script is attached to his response.</description>
      <pubDate>Mon, 24 Feb 2003 19:48:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-reboot-script/m-p/2911845#M933458</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2003-02-24T19:48:33Z</dc:date>
    </item>
    <item>
      <title>Re: Cron Reboot Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-reboot-script/m-p/2911846#M933459</link>
      <description>Hi Ron:&lt;BR /&gt;&lt;BR /&gt;Here you go, although a search would have pulled up caljd.sh. Version 2.10 is the latest. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 24 Feb 2003 19:50:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-reboot-script/m-p/2911846#M933459</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2003-02-24T19:50:27Z</dc:date>
    </item>
    <item>
      <title>Re: Cron Reboot Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-reboot-script/m-p/2911847#M933460</link>
      <description>The 'we don't need no stinking badges' is from _Tresure of the Sierra Madre_, 1935 by John Huston--spoken by some bit-part player unmentioned in the credits (this was 1935, afterall).  Google, as always, is your friend.&lt;BR /&gt;&lt;BR /&gt;Anyway, I'm with the others that believe that rebooting a Unix server every 28 days (or on any regular basis) is something worthy of a Monty Python skit.  This is a stable code base--no memory leaks (well, usually) that require a reset.  I've got systems here that I actually forgot they existed because they require so little attention--uptime +400 days.  We re-discovered them recently because we moved our data center, and somebody asked "Hey whats this?".  The application, of course, was in Cobol, and used a flat file database with ISAM.  &lt;BR /&gt;&lt;BR /&gt;Why don't you ask the boss to see how long your system can go without a reboot?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Chris</description>
      <pubDate>Mon, 24 Feb 2003 20:20:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-reboot-script/m-p/2911847#M933460</guid>
      <dc:creator>Chris Vail</dc:creator>
      <dc:date>2003-02-24T20:20:04Z</dc:date>
    </item>
  </channel>
</rss>

