A system for starting, stopping, and managing automated processes.

learn more… | top users | synonyms (2)

3
votes
1answer
215 views

What is causing launchd to burn my CPU?

I'm running Yosemite, a clean install. launchd continuously runs at 100% CPU. Since the Yosemite upgrade I can't change the log level with 'sudo launchctl log level debug' Checking top or Activity ...
9
votes
2answers
6k views

In OSX Yosemite, why can I set many environment variables for GUI apps, but cannot set the specific variable PATH

After I had sorted out OSX' PATH issues up to the Mavericks release, the problems come back in Yosemite!!! So I want to mimic the old launch.conf feature in the new Mac OSX 10.10 Yosemite release, ...
1
vote
0answers
25 views

dnsextd messages in console

I'm running OS X 10.10.1 and keep getting thousands of lines like the following in the system console log. 12/16/14 2:57:02.937 PM dnsextd[9384]: ConnectToServer - 10 failed attempts. Aborting. ...
2
votes
2answers
922 views

How can I write to Notification Center from a launchd command?

I've got a plist set to run at a set interval, and have put it in /Library/LaunchDaemons like so: /Library/LaunchDaemons $ ll macports_update_notifier.plist lrwxr-xr-x 1 root wheel 55B 5 Sep ...
1
vote
1answer
95 views

coreaudiod and launchd are taking up 80% and 40% processor respectively

I've just upgraded from mavericks to yosemite, the download was sluggish but eventually worked so I don't think any of the files were corrupted. There was no hitch with the installation as far as I ...
1
vote
1answer
19 views

Launchd to terminate what it starts

I have a launchd plist that uses StartCalendarInterval to start my python script at the desired time and day of the week. Now I want to create a launchd plist that both starts and terminates a ...
2
votes
1answer
3k views

Yosemite com.apple.xpc.launchd error every 10 seconds

Every 10 seconds i get this error in my console: 20/10/14 19:35:56,840 com.apple.xpc.launchd[1]: (com.viber.osx[9850]) Could not find and/or execute program specified by service: 45: Operation not ...
41
votes
5answers
37k views

Why am I getting a “dubious ownership of file” error when Launch Agent runs my .plist file?

I have a Launch Agent configured to run a .plist file for example: /Library/LaunchAgent/foo.plist. Inside this .plist, it is set to run during LoginWindow and Aqua. When I attempt to launch my ...
1
vote
2answers
82 views

How do I associate a launchd 2 plist with its domain and service targets?

What exactly are these "domain" and "service targets" and how do I associate them with plists for use by launchd? OS X 10.10 introduces a new launchctl API for managing LaunchDaemons and launching ...
0
votes
0answers
17 views

mount encrypted sparseimage as home directory before login

There are several ways (loginhook, launchdaemon etc.) to automount a sparsebundle before logging in, but there's none without writing down the password in plaintext for automount an encrypted ...
2
votes
1answer
25 views

Is /etc/resolv.conf changed every time my DHCP lease changes?

I'd like to fire an event via launchd whenever my DHCP lease changes the IP on my WiFi interface. My question is similar to what's being asked in this question, which makes me thing I can watch ...
3
votes
0answers
139 views

launchd StartCalendarInterval not working reliably

I have several tasks that I run from launchd using StartCalendar interval. Under Yosemite these do not necessarily run. (Under Mavericks and earlier they did run) How do I see what launchd is doing ...
0
votes
0answers
50 views

Yosemite: launchd scheduled jobs do not run

Since upgrading to Yosemite, all my launchd scheduled jobs do not run on their specific time set. The system log does not have any launchd related logs that can hint what the problem is. A sample ...
0
votes
1answer
15 views

Print from launchd task

I have a script that needs to be running in the background periodically (I've put it there with Lingon X). That script (PHP based) is 1. polling a server, 2. retrieving a PDF file from the server 3. ...
3
votes
2answers
722 views

Why is my 'launchd' task not responding to changes in watched files?

I have a launchd task that is not triggering when a file changes, and can't figure out why it's failing. When I load the .plist below with launchctl load ...
4
votes
1answer
60 views

Launchd starts event 40 seconds later?

I've created a .plist file, which should act as system daemon (global with root user). This .plist file listens to the settings directory for changes like changing network settings. When this happens ...
2
votes
1answer
639 views

Can't connect to rpcbind on localhost

Since upgrading to OS X 10.9 Mavericks, I can't connect to the rpcbind daemon anymore. launchctl tells me that rpcbind is loaded but not running: $ sudo launchctl list | grep rpcbind - 0 ...
5
votes
1answer
672 views

/etc/launchd.conf setenv value containing whitespace

In my /etc/launchd.conf file, I added these lines in an effort to figure out exactly how to create globally scoped environment variables whose values contain whitespace. setenv foo1 123456 setenv ...
0
votes
1answer
34 views

How to associate a route with an interface?

I have a Mac with two network interfaces, connected to different networks. For the sake of argument, let's say one is connected to a private network and the other to the Internet. I understand that ...
7
votes
2answers
9k views

Stopping LaunchAgents and Daemons

I work as admin in a college environment. One of the challenges is to stop the services installed by students with CS major. Some time back they got the admin access and installed launch agents and ...
1
vote
1answer
198 views

Setting environment variable for sudo in Yosemite

I followed this similar question to set my environment variables in Yosemite: ...
0
votes
1answer
47 views

Setting environment variables for scripts run by launchd?

I have a script that worked in the past, but seems to be having issues now (I believe it's due to Yosemite). What I had done was created an environment variable that was set to "false" and then my ...
0
votes
2answers
257 views

How do you start and stop the Spotlight server in Yosemite?

There are many forums answering this question for previous versions of MAC OSX, but 10.10 doesn't seem to have the service 'com.apple.metadata.mds.plist' in /System/Library/LaunchDaemons. It has 3 ...
1
vote
0answers
45 views

How launchd StartInterval behaves after long sleep?

I have a 21,600secs (4hours) job using launchd.plist. I have 2 mac, main and sub. With main mac, my plist works fine. But with sub mac, which is wakes up 3~4 times per week, my plist does not seems ...
0
votes
2answers
95 views

Launchd unloading LaunchDaemon

I have a script scheduled to run as LaunchDaemon. Script runs fine when launched manually through terminal. I have two commands sudo launchctl unload -F /Library/LaunchDaemons/com.test.plist sudo ...
3
votes
1answer
91 views

Start Apache httpd on boot

Since upgrading to Yosemite, Apache httpd is no longer started at boot time. I've tried: sudo launchctl load org.apache.httpd.plist but I'm getting a service is disabled error. I've modified the ...
6
votes
6answers
2k views

Run bash script at login stored in the home folder?

When I try to load a LaunchAgent plist from launchctl I can't find out how to run a script in the home directory. My code is: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC ...
0
votes
0answers
21 views

Why won't my drush script run as a Launch Daemon?

On the command line I successfully run this: /usr/bin/php /usr/local/opt/drush/libexec/drush.php '@hostmaster' hosting-dispatch or even: drush '@hostmaster' hosting-dispatch and ...
5
votes
3answers
337 views

Run Script on Logout Without Use of Logout Hook

I've been looking into running a few cleanup commands when a user logs out, however the old logout hook feature, although still functioning, has been deprecated for some time now so may not be with us ...
1
vote
0answers
18 views

Run script (a la LaunchDaemon) before automatic app resume kicks in

I have an encrypted disk image that I use to store some sensitive data. It also includes a license key file for an application. Upon boot, I automatically mount this disk which restores the ...
2
votes
2answers
500 views

How do you set the maxopenfiles limit in Yosemite?

How do you set a soft limit for maxopenfiles in Yosemite? I installed Yosemite last night, and now it's ignoring my settings in my /etc/launchd.conf file: $ cat /etc/launchd.conf limit maxfiles ...
0
votes
0answers
102 views

Bash shell doesn't inherit $PATH set in /etc/launchd.conf

I am new mac OS X user and recently I am setting up my laptop as a work environment. That concerns environment variables setting in shell. After some search work I found several ways to set ...
0
votes
1answer
49 views

What is the best practice for creating a daemon with launchd that runs at lower than default priority

I have a daemon I would like have to parallelize up to the number of cores on a user's machine, but I don't want it interfering with foreground tasks. Traditionally, in unix, I would just run this ...
0
votes
1answer
139 views

Launchd Multicast Socket Listener

I'm not sure if I've just missed some documentation or not, but I'm having a hard time figuring out how to set up a launchd agent that can be triggered whenever a datagram is received within a ...
0
votes
0answers
60 views

Mac ssh-agent not being started automatically by launchd

A few days ago on my Mac running Mavericks (MacOS X 10.9.4) I noticed that any operations using ssh started to ask me for my ssh passphrase. If you look at... ...
0
votes
1answer
37 views

start and stop OS X router daemon

I'd like to be able to stop and (re)start the OS X routing daemon and review the routed configuration file(s). I think this would involve using launchctl unload and load, but I don't know the name of ...
0
votes
0answers
8 views

Predicting what jobs launchd will run between some pair of dates/times

I have a number of launchd jobs that are triggered only by time (e.g., "run job X every Tuesday at 5 am"). Can I get launchd (or some other tool) to tell him which of them will run, between, says, ...
0
votes
2answers
85 views

How to add a timestamp in log files on launchd?

In launchd, you can change the path of the log files in .pist file using StandardOutPath and StandardErrorPath, but when I used it to output the log returned by the process, the resultant log files ...
0
votes
0answers
16 views

Console invocation to launchd plist job

Is there any tool that can convert console invocation to launchd plist job? I have command to test like this: date >> /tmp/example_filet.txt or ruby script.rb -p -t -b n,g,b -o 'file to ...
0
votes
2answers
100 views

Run script as root whenever any user logs in

What's the best way to run a script with root privileges whenever any user logs in? It should run in the background without prompting the user for a password.
3
votes
1answer
355 views

launchd with high disk usage

launchd is producing a lot of I/O activity. In the last day and a half it managed to write 12 GB of data while reading 500MB. I the logs I do not see anything suspicious. Any suggestion at where ...
0
votes
0answers
121 views

Customized default user profiles randomly not loading

I manage Macs in public computer labs and classrooms at a university. My general set up is as follows: Clients are running 10.8.5, OD Masters are running 10.7.5. Open Directory Master to manage ...
0
votes
0answers
46 views

Bootstrap context issues when logging in via ssh with private key

I use ssh to connect to my laptop remotely. Recently, I decided to improve security by using a private key to authenticate instead of a password. I am able to connect and login with my user account, ...
3
votes
2answers
3k views

Force launchd to re-read environment variables

Is there any way, short of rebooting, to force launchd to re-read environment variables newly defined in /etc/launchd.conf? Can it be done with launchctl(1)?
0
votes
0answers
21 views

I need a background process which redirects a link based on whether or not an external hard drive is connected

Basically I have two iTunes libraries. One is my complete iTunes library which I store on my external hard drive. The other is a smaller version that I keep locally. I want to have a symbolic link ...
3
votes
2answers
123 views

Run action when device is detached

I'm using a launchd agent to run a shell script whenever I connect my thunderbolt dock. I've been able to use IOKit notifications to detect when the dock is being attached, but I also want to run a ...
0
votes
2answers
138 views

Need help creating Global Daemon for EyeFi Server

I have been trying to come up with a headless solution for transferring images from an eyefi card to my mac. The software from the vendor is decent, but it will only transfer images if there is a ...
1
vote
2answers
655 views

Why Does a Shell Script Trapping SIGTERM Work When Run Manually, But Not When Run via launchd?

Okay, quite simply I have a shell script that needs to wait for something to happen, but it has a lock-file and some child-processes that I need to ensure are tidied up if the script is interrupted. ...
2
votes
1answer
313 views

How do I increase “ulimit -u” (max user processes)?

I can change all of the usual ulimits via (for instance) ulimit -n 8192 and launchctl limit maxfiles 8192 8192. Somehow, this doesn't seem to work for -u, the maximum number of user processes: ~$ ...
0
votes
1answer
98 views

Where does Applescript Event Log go when run under Launchd?

Or, how to log from an AppleScript (saved as application) and/or view the Event Log? None of the AppleScript's log statements can be found. I have tried adding the following to the launchd plist: ...