6 Replies Latest reply: Feb 6, 2009 8:32 PM by Rick Anderson
Rick Anderson Level 2 Level 2 (165 points)
I've been gradually migrating my cron entries over to launchd and having no trouble for the most part, but in cron I have some commands like this:

scp /Volumes/data/basketball/girls/data/*.txt loginid@pubsys.example.com:remote/cgi-bin/basketball/girls/data/

No problem in cron, but launchd stumbles on these kinds of things frequently. I understand that you can't necessarily have commands in there like that, but I've gotten some to run. I've discovered that rewriting some command like this to have quotes around each parameter works:

scp "/Volumes/data/basketball/girls/data/*.txt" "loginid@pubsys.example.com:remote/cgi-bin/basketball/girls/data/"

In this particular case, FWIW, that doesn't work. It still errors out, but it has worked for other commands. I'm still tinkering with it, but I'm wondering what the rules are when it comes to running commands directly in launchd like that. Are you supposed to do it this way? I'm hoping I don't have to create a separate shell script for each of these. It was really convenient in cron to be able to run commands directly in the utility itself.

Mac OS X (10.5.6)