• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: cron/Launchd Editor
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cron/Launchd Editor


  • Subject: Re: cron/Launchd Editor
  • From: Robert Poland <email@hidden>
  • Date: Thu, 17 Sep 2009 22:05:41 -0600

Phillip,

On Sep 17, 2009, at 8:50 PM, Philip Aker wrote:

On 2009-09-17, at 18:55:36, Tom Robinson wrote:

On 2009-09-18, at 08:27, Robert Poland wrote:

<key>Program</key>
<string>/Library/Scripts/Universal\ Scripts/playMantelSound</ string>
<key>ProgramArguments</key>
<array>
<string>/Library/Scripts/Universal\ Scripts/playMantelSound</ string>
</array>

What's playMantelSound (shell script? AppleScript?) and why does it pass a parameter of itself to itself?

He's created his plist with some utility. It's looks like it's trying to follow the guidelines but doesn't have it quite right. The parameters are the same as those for <x-man-page://3/execvp> as transcribed for the launchd property list XML format. So the Program should contain the full path to the tool, but the first ProgramArgument should contain only the name of the tool.


It does seem kind of odd not to see a .scpt or .scptd extension, but that's a user preference. However if he's just hiding the extension rather than omitting it entirely, then that will be a problem as well (and possibly the cause of the error he reported previously).

Interesting observation, I have the Finder preferences set to show all Filename Extensions. As you noted these were gotten by the Browse command in Lingon.


I'll try adding .scpt and see if that makes a difference. Didn't seem to help.

Here's the edited script;
It is supposed to sound the Mantel sound on the hour every hour.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd ">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.rpoland.playMantelSound</string>
<key>OnDemand</key>
<false/>
<key>Program</key>
<string>/Library/Scripts/Universal Scripts/playMantelSound.scpt</ string>
<key>ProgramArguments</key>
<array>
<string>playMantelSound</string>
</array>
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key>
<integer>0</integer>
<key>Minute</key>
<integer>0</integer>
</dict>
<key>StartInterval</key>
<integer>3600</integer>
</dict>
</plist>


Here's the console error.
9/17/09 10:04:32 PM com.apple.launchd.peruser.501[159] (com.rpoland.playMantelSound[43107]) posix_spawn("/Library/Scripts/ Universal Scripts/playMantelSound.scpt", ...): No such file or directory



Philip Aker
echo email@hidden@nl | tr a-z@. p-za-o.@


Bob Poland - Fort Collins, CO



_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: cron/Launchd Editor
      • From: Philip Aker <email@hidden>
References: 
 >cron/Launchd Editor (From: Robert Poland <email@hidden>)
 >Re: cron/Launchd Editor (From: Philip Aker <email@hidden>)
 >Re: cron/Launchd Editor (From: Robert Poland <email@hidden>)
 >Re: cron/Launchd Editor (From: Philip Aker <email@hidden>)
 >Re: cron/Launchd Editor (From: Robert Poland <email@hidden>)
 >Re: cron/Launchd Editor (From: Tom Robinson <email@hidden>)
 >Re: cron/Launchd Editor (From: Philip Aker <email@hidden>)

  • Prev by Date: Re: cron/Launchd Editor
  • Next by Date: Re: cron/Launchd Editor
  • Previous by thread: Re: cron/Launchd Editor
  • Next by thread: Re: cron/Launchd Editor
  • Index(es):
    • Date
    • Thread