Why are my daily scripts running more than daily?
March 21, 2006 9:49 PM   Subscribe

Why are my daily scripts on OS X running more than daily?

Being the paranoid sort, I have an rsync backup script that should run every night under OS X Tiger, but there are some problems I've found with every method I've tried.

cron: Does not work if the macintosh is sleeping, but would be my preferred method for scheduling jobs in the early morning hour when I'm sleeping.

launchd: Runs on it's own clock. As far as I can tell, scheduling a task for 3:15am is meaningless if the computer sleeps.

anacron: runs the script just after midnight and every time I wake up the system. Since my purpose in waking up the system is to get some work done, this is obviously less than desirable.

At this point, I suspect my best option is to never put the system to sleep and go back to cron. Or setup a wakeup call for my system in the power preferences just before the cron job is scheduled.

Second question: will excluding a backup directory in spotlight preferences prevent the automatic mdimport indexing of that directory every time the backup script runs?
posted by KirkJobSluder to Computers & Internet (3 answers total)
 
Write an hourly script that checks for system load < N (or whatever other metric), then checks for a timestamp for the current day, and if not found, runs and creates said timestamp (as well as removing any others previously created). Da?
posted by kcm at 11:24 PM on March 21, 2006


OR Set the energy control panel so that the Mac never sleeps (The hard drive and monitor can). More and more I have discovered that the Mac does less and less while 'sleeping'. The only disadvantage is the slightly more energy consumed.
posted by Gungho at 6:23 AM on March 22, 2006


Or setup a wakeup call for my system in the power preferences just before the cron job is scheduled.

Yes.
posted by nebulawindphone at 6:44 AM on March 22, 2006


« Older Did my site get a DoS attack?   |   Door number 3, Monty! Newer »
This thread is closed to new comments.