From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1020c6,c0b68e7f7e519d7b X-Google-Attributes: gid1020c6,public X-Google-Thread: fee84,c0b68e7f7e519d7b X-Google-Attributes: gidfee84,public From: Jim Zahrndt Subject: Re: Inserting a system reboot in crontab script Date: 1996/11/13 Message-ID: <3289EFA0.7AB3@cbsofil.com>#1/1 X-Deja-AN: 196283046 references: <01bbd05d$a6174760$99d3bb8b@pc-blg.nsc.com> to: Benjie Gandionco content-type: text/plain; charset=us-ascii organization: Computer Business Services of Illinois mime-version: 1.0 reply-to: jzahrndt@cbsofil.com newsgroups: comp.unix.admin,comp.unix.osf.osf1 x-mailer: Mozilla 3.0 (Win95; I) Benjie Gandionco wrote: > > Is it possible to insert a system reboot in a crontab script? > I want to do a reboot in the middle of a script and then continue > right where it left off. > > Thanks. The only way I can think of implementing this type of action sequence is: 1) In your crontab script have the last two lines be like: touch /etc/LeftOffHere shutdown -r now 2) In your system startup file/directory (depends on OS) In /etc/rc.local add a couple of lines like: if [ -e /etc/LeftOffHere ] then rm /etc/LeftOffhere # enter the pathname of the script to execute if # this circumstance is met or the lines to execute # to continue on with the original crontab script. fi In /etc/rc3.d create a script file similiar to the RC.LOCAL entry. Hope this helps. Jim Zahrndt (jzahrndt@cbsofil.com)