View Single Post
Old 08-06-2007, 09:15 PM
Drdul Drdul is offline
Registered User
Join Date: Jul 2007
Posts: 29
Smile Solved the Problem!

Hi Dave:

I'm a Mac noob, so I've been spending some time learning about cron. Interestingly, in the course of bouncing around the 'net looking for cron-related info, I've found several reports of problems with cron not running scheduled jobs. Based on what I've learned, I've got a couple of questions about cron before I get to the specifics of my problem:
  1. I understand that in OS X 10.4, Apple introduced launchd as the preferred way of running scheduled jobs, rather than cron. With the impending release of OS X 10.5, I would assume that there will be even greater emphasis on launchd and less on cron. I'm curious why SD still uses cron, and if there are plans to switch to launchd.
  2. I gather that periodic jobs are a third way of running scheduled jobs, which is what OS X uses for daily, weekly and monthly maintenance tasks. In my case, I want to run one job daily and one job weekly, so the periodic jobs feature is attractive. I realize that periodic jobs are scheduled to run around 3 to 5 a.m., and in my case my computer is asleep at that time, so I use Macaroni to execute the jobs at another time when when the computer is on. I am assuming that if I could add the SD jobs to etc/peridoic, Macaroni could handle them, too. Is there a way for me to add each SD job to the daily and weekly directories in etc/periodic/?
Now, to my problem. Rather than fart around with the problem jobs, I simply deleted them and started from scratch. I had been using an "em" dash () in the name of each disk image and in the name of each settings file, and I noticed that the "em" dash ends up as a bunch of garbled \%xx characters in the crontab listing. Thinking that the "em" dash could be causing a problem, I didn't use any "em" dashes in the new job.

The scheduled job ran fine. To test it out, I also pasted the "open..." command from the crontab listing into Terminal, and it ran fine, too. So cron is obviously working fine on my system, and the problem appears to be solved.

I can only guess that the "em" dash was the problem, as it was immediately after I changed the names of the disk images and settings files to include an "em" dash that the scheduled jobs stopped working. You might want to build a check into SD for disk image names or settings file names that have funky characters like "em" dashes, and advise users to keep to standard characters.

Reply With Quote