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 > Launchd, cron, sleep, and automation

Launchd, cron, sleep, and automation
Thread Tools
Mac Elite
Join Date: Oct 2000
Status: Offline
Reply With Quote
May 26, 2006, 08:20 AM
 
Someone help me out here. I've scoured the web for information on this and I still don't have a good answer.

First, this is my goal: have OSX run an Automator action in the middle of the night, or as soon as the computer wakes up. And have it run wheather any user is logged in or if nobody is logged in.

Simple, right?

Well, a simple cron job isn't working. Apparently cron has trouble launching basic commands (do I need a Perl script or something here?)

So the obvious alternative is launch deamon (launchd). But Apple apparently still hasn't fixed the bug where launchd doesn't keep track of elapsed sleep time, so there is some "drift" in the launch time (if you sleep your computer for 5 hours, the schedule will move back by 5 hours).

So, could anyone suggest a solution to this simple task? There are a lot of third party apps out there, and I just wanted to hear from someone who has done this to advise me on the best method of doing this.

Thanks.
"It's about time trees did something good insted of just standing there LIKE JERKS!" :)
     
Grizzled Veteran
Join Date: Mar 2004
Status: Offline
Reply With Quote
May 26, 2006, 04:43 PM
 
Have you tried Anacron already?
-HI-
     
Brazuca  (op)
Mac Elite
Join Date: Oct 2000
Status: Offline
Reply With Quote
May 29, 2006, 05:33 PM
 
Originally Posted by Hal Itosis
Have you tried Anacron already?

I will give it a try, but I thought that cron was deprecated.

Btw, your breath stinks.
"It's about time trees did something good insted of just standing there LIKE JERKS!" :)
     
Brazuca  (op)
Mac Elite
Join Date: Oct 2000
Status: Offline
Reply With Quote
May 29, 2006, 08:25 PM
 
Ok, I tried Anacron, but it seems to assume some knowledge of editing configuration files, etc.

Question, in Anacron, if I want to set up a command (open /path/app) to be run by any user, how do I set it up? Detailed instructions would be best please, as my CLI knowledge is pretty limited.
"It's about time trees did something good insted of just standing there LIKE JERKS!" :)
     
   
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 01:02 AM.
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