Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

As a continuation from my initial question...

Routinely backup log file in OSX?

I'm attempting to backup a logfile on an OSX computer and a jailbroken iPhone. LaunchD was recommended as a solution and some Google searches later revealed LingOn to be the tool to use.

The output (after me filling the fields) gives me this PList:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">

Now running my python script by invoking it in the terminal will successfully send the email to my inbox with the attachments I need.

LaunchD just doesn't launch though and I'm not sure why.

share|improve this question
Have you registered your plist with launchctl? Where did you put this file? – Daniel Beck Jul 2 '11 at 10:36
Lingon puts the plist in /Library/LaunchDaemons/ – Ash Jul 2 '11 at 11:32
I also registered with sudo launchctl load w- com.ash.MySuperLaunchd – Ash Jul 2 '11 at 11:39
I thin you need to load the file path, not the arbitrary identifier you assign, at least the man page looks like that. Also, I recommend you make the script file executable, add a shebang header specifying the path to which python and execute it directly to circumvent PATH issues. Lastly, check /Applications/Utilities/ for error messages. – Daniel Beck Jul 2 '11 at 12:18
I double checked the shebang header and it was not pointing to the right directory. My fault as I copy and pasted a script that was made for Linux. Everything is now working, only I do not know how to replicate this on the iPhone. – Ash Jul 2 '11 at 15:00

You need to load the agent. Either relogin, or launchctl load /path/to/file.plist.

RunAtLoad is false by default, so the script is run for the first time StartInterval seconds after it's loaded, in this case 3600.

The path in ProgramArguments needs to point to the permanent location of the script, so it probably shouldn't be at ~/Desktop/. The target script doesn't need to be executable. But as correctly troubleshot by @DanielBeck in the comments, check that you're able to for example python /Users/ash/Desktop/ in the first place and that the shebang line is correct.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .