image
image

Go Back   macosx.com > Mac Help Forums > Unix & X11

Reply
 
LinkBack Thread Tools
  #1  
Old December 7th, 2003, 08:25 PM
michaelsanford's Avatar
Translator, Web Developer
 
Join Date: Oct 2002
Location: Ottawa/Montréal
Posts: 2,278
Thanks: 0
Thanked 4 Times in 4 Posts
michaelsanford is on a distinguished road
Cron jobs when shutdown? Run at boot?

I'm sure there's a post on this somewhere, but I couldn't find it.

Obviously I don't leave my Clamshell iBook on all the time. So, what happens to my maintenance cron jobs when my computer's off? Do they run at next boot, or are they not run at all?
__________________
michaelsanford.comIdenti.ca
• iMac Aluminum 24" |
MacOS X 10.5 (current) | 3.06 GHz Intel Core Duo | 4 GB RAM, 1 TB HDD
• Acer AspireOne 1.60 GHz | Windows XP Home | 1 GB RAM, 100 GB HDD
• AMD Athlon64 3500+ | Ubuntu
-server x86_64 | 1240 GB RAID
Reply With Quote
  #2  
Old December 7th, 2003, 10:30 PM
phatcactus's Avatar
The Ugly Organist
 
Join Date: Aug 2002
Location: Chicago
Posts: 330
Thanks: 0
Thanked 0 Times in 0 Posts
phatcactus is on a distinguished road
They don't run at all.

Google says there are alternative programs that will run jobs at the next boot, like hc-cron, but I haven't the slightest idea as to how to install them. Perhaps someone with some experience can help...
__________________
Pedestrian: Quality Chicago Heights Rock!
http://www.pedestrianisaprettygoodband.com/
Reply With Quote
  #3  
Old December 8th, 2003, 06:24 AM
Darkshadow's Avatar
wandering shadow
 
Join Date: Jul 2001
Location: DE, USA
Posts: 1,532
Thanks: 0
Thanked 0 Times in 0 Posts
Darkshadow is on a distinguished road
You want anacron. Easiest way to install it is via fink (otherwise, you'll have to track down some libraries that aren't installed on OS X before you can compile it).

Some caveats:
It doesn't run all the time like cron does. You can set it up to run at boot, and it'll run any jobs that need to run, but then it quits. The seriously funny thing, straight from anacron's read me file:
Quote:
"In addition to running Anacron from the boot-scripts, it is also
recommended to schedule it as a daily cron-job (usually at an early
morning hour), so that if the machine is kept running for a night,
jobs for the next day will still be executed."

You can, of course, run it manually when needed.
__________________
I am but a lonely shadow,
Doomed forever to roam and wander.
But if you allow me to pause before I must go,
I'll spin you tales of mystery and wonder.


Site: Night Productions
Reply With Quote
  #4  
Old December 8th, 2003, 10:39 AM
pds's Avatar
pds pds is offline
conf User
 
Join Date: Oct 2002
Location: On the edge.
Posts: 2,278
Thanks: 0
Thanked 3 Times in 3 Posts
pds is on a distinguished road
Why shut down?
No real reason as far as I can see, unless you are on safari and have no power outlet. I leave my iBook on constantly. That way it is virtually instantly on when I want it.

So a startup cron doer won't do, but the machine sleeps and then the cron bits don't work either.

o'reilly just had a bit on doing it manually, look here
Reply With Quote
  #5  
Old December 8th, 2003, 10:46 AM
bobw's Avatar
The Late: SuperMacMod
 
Join Date: Mar 2001
Location: Phila,PA
Posts: 8,835
Thanks: 0
Thanked 27 Times in 21 Posts
bobw has a spectacular aura aboutbobw has a spectacular aura about
Here are some programs you can use to have the jobs run on your time schedule;

http://www.versiontracker.com/php/se...macosx&x=0&y=0
__________________

Reply With Quote
  #6  
Old December 8th, 2003, 11:27 AM
michaelsanford's Avatar
Translator, Web Developer
 
Join Date: Oct 2002
Location: Ottawa/Montréal
Posts: 2,278
Thanks: 0
Thanked 4 Times in 4 Posts
michaelsanford is on a distinguished road
pds » my iBook make a lot of noise and I'm a light sleeper, so I have to put it to sleep for me to sleep, so the cron jobs don't run.... I don't mind rebooting in the morning while my coffee brews. Thanks for the article too, very useful.

Thanks for the advice on anacron, I was considering mentioning it, since I had it on my RedHat box, but I thought Apple might have a clever built-in workaround.
__________________
michaelsanford.comIdenti.ca
• iMac Aluminum 24" |
MacOS X 10.5 (current) | 3.06 GHz Intel Core Duo | 4 GB RAM, 1 TB HDD
• Acer AspireOne 1.60 GHz | Windows XP Home | 1 GB RAM, 100 GB HDD
• AMD Athlon64 3500+ | Ubuntu
-server x86_64 | 1240 GB RAID
Reply With Quote
  #7  
Old December 8th, 2003, 11:46 AM
bobw's Avatar
The Late: SuperMacMod
 
Join Date: Mar 2001
Location: Phila,PA
Posts: 8,835
Thanks: 0
Thanked 27 Times in 21 Posts
bobw has a spectacular aura aboutbobw has a spectacular aura about
The new Schedule feature in the Panther Energy Saver System Preferences Pane, can now set your machine to automatically turn itself on and off at any given hour. You could use that for the Cron tasks.

You need to alter the crontab so that the tasks ran at 3:15, 3:30, and 3:45 rather than the time spread they are currently set at.

http://www.macosxhints.com/article.p...01020700163714
__________________

Reply With Quote
Reply

Bookmarks

Thread Tools

Posting 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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump


All times are GMT -5. The time now is 05:26 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC1
Copyright 2000-2010 DigitalCrowd, Inc.