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 > macOS > Timed events and whatnot

Timed events and whatnot
Thread Tools
Jaey
Mac Elite
Join Date: Dec 2003
Status: Offline
Reply With Quote
Sep 24, 2004, 04:26 PM
 
Basically, I want to download a file off of the internet every sunday night, at say, 8:00 pm without my having to open up Safari. I'm not really a Unix jock so I was wondering if there is a quick and easy way to accomplish this.

thanks
     
i_m_a_l_e_x
Fresh-Faced Recruit
Join Date: Oct 2003
Location: LA
Status: Offline
Reply With Quote
Sep 24, 2004, 10:20 PM
 
I'm no guru, but here is what I would do....

First install wget or some other command line downloading program. http://www.gnu.org/software/wget/wget.html

Then edit your crontab file to execute the wget command you need at a specific time every day. There is a pretty good crontab tutorial here. Scroll down to the section on editing your user crontab and set it up that way.

If you aren't too familiar with the command line than you will probably want to edit your crontab file with the pico text editor rather than vi (pico is much more user-friendly). To do this enter this command: export VISUAL=pico What this does is sets the "VISUAL" environment variable in your shell to pico. That way when you type "crontab -e" as specified in the tutorial above you will be editing your crontab in pico instead of vi which is the default. For more on environment variables take a look at this page: http://www.macdevcenter.com/pub/a/ma...2/24/bash.html


good luck!
     
larkost
Mac Elite
Join Date: Oct 1999
Location: San Jose, Ca
Status: Offline
Reply With Quote
Sep 26, 2004, 11:52 PM
 
curl is already installed on the system, and you can schedule it with cron like i_m_a_l_e_x suggested. My one tip on this would be to make sure you have absolute paths on everything (like /usr/bin/curl) as cron tends to run without environmental variables being set.
     
Jaey  (op)
Mac Elite
Join Date: Dec 2003
Status: Offline
Reply With Quote
Sep 28, 2004, 08:04 PM
 
Ooh, I got it. Thanks guys.
     
   
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
Top
Privacy Policy
All times are GMT -4. The time now is 03:16 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,