Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > LaunchAgent Trouble

LaunchAgent Trouble
Thread Tools
Addicted to MacNN
Join Date: Jan 2000
Location: Stoneham, MA, USA
Status: Offline
Reply With Quote
Jan 29, 2013, 03:47 AM
 
I'm trying to make a LaunchAgent that runs a script every 10 seconds. It works well, but it ONLY works when I'm logged in. If the computer boots up and is handing out at the login screen, the script won't run.

This is currently in /System/Library/LaunchAgents/ but it still only runs when I'm logged in:
Code:
<?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.macfixer.coldmac_temp_updater</string> <key>RunAtLoad</key> <true/> <key>ProgramArguments</key> <array> <string>/software/get_temps.php</string> </array> <key>StartInterval</key> <integer>10</integer> </dict> </plist>
     
l008com  (op)
Addicted to MacNN
Join Date: Jan 2000
Location: Stoneham, MA, USA
Status: Offline
Reply With Quote
Jan 29, 2013, 04:12 AM
 
So I read that what I want is LaunchDaemons not LaunchAgents. So I moved my script from /System/Library/LanuchAgents/ to
/Library/LaunchDaemons/

Still nothing though. In fact, in there, it doesn't even when when I'm logged in.
     
l008com  (op)
Addicted to MacNN
Join Date: Jan 2000
Location: Stoneham, MA, USA
Status: Offline
Reply With Quote
Jan 29, 2013, 05:43 AM
 
So apparently, LaunchDaemons need a specific set of permission else they won't run. I corrected that nd now things seem to be running properly!
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -4. The time now is 01:39 PM.
All contents of these forums © 1995-2014 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2014, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2