Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > script to restart.....

script to restart.....
Thread Tools
Registered User
Join Date: Jan 2003
Status: Offline
Reply With Quote
Mar 16, 2003, 12:12 AM
 
does anyone know how to make a script to restart my computer every 3 days for example at a specified time ????? Could it show a warning before restarting ?????
     
Professional Poster
Join Date: Oct 1999
Location: :ИOITAↃO⅃
Status: Offline
Reply With Quote
Mar 16, 2003, 08:01 AM
 
Use Cronnix to add a Crontab entry that looks like this:
Code:
30 6 * * 1,3,5 /usr/bin/osascript -e 'tell application "Finder" to restart'
That will restart the computer at 6:30am every Monday, Wednesday, and Friday.

Why do you want to do this? Is there some underlying problem that you hope restarting will fix?
     
Forum Regular
Join Date: Mar 2003
Location: San Antonio
Status: Offline
Reply With Quote
Apr 2, 2003, 07:11 PM
 
Was doing something to upgrade perl so I could get showtimes to work (application for the palm, well, the treo in my case... it downloads movie times to a local database to the palm so I can check movie times/listings in my area) and finally got it working, but then went to cron to make an entry and either I don't know what I'm doing (highly possible :) or I broke something when I fixed the other thing... I went to make a cron entry and when I do, nothing happens at the specified time...

% man crontab

zcat: /usr/share/man/cat1/crontab.1.gz: not in gzip format

As you can see, man crontab and man cron give errors to me just like the one above... I made an entry manually and using cronnix and neither entry attempt either in an individual user or as a system entry work for me. Any ideas?

Rey :)

15 3 * * * root periodic daily
30 4 * * 6 root periodic weekly
30 5 1 * * root periodic monthly
24 * * * * * /usr/bin/open "/Users/stingrey/showtimes-0.5-unix/getdata.pl
24 * * * * * /Users/stingrey/showtimes-0.5-unix/getdata.pl
(Last edited by Stingrey; Apr 2, 2003 at 07:25 PM. )
     
Forum Regular
Join Date: Mar 2003
Location: San Antonio
Status: Offline
Reply With Quote
Apr 2, 2003, 08:04 PM
 
Believe it or not, ran the script before it was relocated, it worked... Moved it just before adding cron entry. After move, realized had to do a -c to specify the path to the config file... That was the main prob, then the script was owned by root... Chowned to user, ran as user, and viola!!!

Rey
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 07:49 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2