> -----Original Message----- > From: Linux on 390 Port [mailto:[EMAIL PROTECTED] On > Behalf Of Mark Post > Sent: Thursday, June 05, 2008 10:54 AM > To: [email protected] > Subject: Re: question about "at" > > >>> On Thu, Jun 5, 2008 at 10:57 AM, in message > <[EMAIL PROTECTED]>, LJ Mace > <[EMAIL PROTECTED]> > wrote: > > I need to reboot a linux server and instead of putting > several commands in > > cron then removing from cron I'd like to just use the at command. > > The preoblem is, I need to do 3 things and a reboot needs > to take place as > > the 2nd process. > > I've looked around the net but couldn't(didn't) fine the answer > > If the reboot is the second out of three, most likely the > third isn't going to execute if it takes more than a few > fractions of a second. Still, if you create a script with > the three actions in it, and use the at command to execute > that, it will do at least the first two of the three actions. > > > Mark Post
What about something like: at now +5 minutes >step 1 >echo "step 3" | at now +10 minutes >/sbin/shutdown -r now This should do step 1 in 5 minutes. Then schedule step 3 in 10 minutes. Then reboot. -- John McKown Senior Systems Programmer HealthMarkets Keeping the Promise of Affordable Coverage Administrative Services Group Information Technology The information contained in this e-mail message may be privileged and/or confidential. It is for intended addressee(s) only. If you are not the intended recipient, you are hereby notified that any disclosure, reproduction, distribution or other use of this communication is strictly prohibited and could, in certain circumstances, be a criminal offense. If you have received this e-mail in error, please notify the sender by reply and delete this message without copying or disclosing it. ---------------------------------------------------------------------- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
