launchd is an open-source daemon intended to streamline and accelerate starting and stopping of processes on a *nix OS.

learn more… | top users | synonyms

0
votes
0answers
22 views

How to create a launchd for hubot

I've tried to create a launchd for hubot executable but it always fail with the following error: Service exited with abnormal code: 127 Here you are the launchd config file: <?xml version="1.0" ...
-2
votes
1answer
28 views

How to run an SSH server on a laptop?

I want to create a program that allows a user to SSH into their laptop. But there is a serious problem: laptops sleep when they close. In particular, I believe this cannot be disabled on OS X. Does ...
0
votes
0answers
19 views

RabbitMQ/Elasticsearch too few/many files (ulimit, limit maxfiles)

This is for my local dev setup: Problem #1: RabbitMQ was running out of socket descriptors for which the recommended solution was to set ulimit -n 65536 65536 in ~/.zshrc Problem #2: ...
1
vote
1answer
72 views

unable to load script via launchctl “command not found”

I have a problem loading a script to watch a folder via fswatch in /Library/LaunchAgents The script runs fine when run from terminal, but via my plist, it gives me "Command not found" for fswatch in ...
1
vote
1answer
18 views

LaunchDaemon to start server process doesn't work

I've tried to write this LaunchDaemon to start my server process. Seem like it should be simple, plutil lint says the file is "OK", but it doesn't launch. I've tried a number of variations and am ...
0
votes
0answers
21 views

Launch agent to run a .sh when it is added to a folder

I am trying to create a launch agent that will monitor a folder for when a .sh file has been added to it and then run it. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC ...
0
votes
1answer
58 views

Needing to open OS X bash script as via launchd IN a terminal window

I've got a lengthy and complex bash script which works OK, but I'm trying to automate my deployment process and I'm flummoxed at this point. I can get the script to run as a LaunchAgent no problem, ...
1
vote
0answers
17 views

mysqldump via launch daemon on mac osx not working

I'm trying to create a mysqldump of a database via bash script, and automate the process by using Mac's launchd / launchctl process. I can successfully run the bash script manually to backup the db in ...
1
vote
2answers
294 views

Setup sshd to start at boot on OSX El Capitan

I have a setup where I have an OSX machine as a server. OS is OSX El Capitan. One of the services it needs to have is sshd. The problem I am trying to solve is that when ever I reboot, I need to ...
0
votes
0answers
20 views

Is there a way to specify relative log path for launchd?

I have defined a user agent using launchd, but I really want to make the job definition reusable accross all my computers. Now the only unreusable part is the log path, is there any way to resolve ...
0
votes
1answer
53 views

Error creating a Ruby launchd task with RVM in OS X

I want to periodically run a ruby gem based command. I am using RVM and following the tutorial set out here. My ruby task is called daily_checks.rb and is as follows: #!/usr/bin/env ruby puts 'in ...
0
votes
0answers
74 views

env: node: No such file or directory when using plist file

I am trying to put together a transcode service with an easy API. If i run it from the Terminal using the string BGOMACRED-ITTEST:/ User$ ...
0
votes
0answers
30 views

How to stop Google Drive from opening folder in Finder when launched

I am using Launchd to open google drive whenever something happens in the drive folder. The XML looks like this: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD ...
2
votes
0answers
306 views

Why is diagnostics_agent “inherently inefficient” and what to do about it?

I have a clean install of 10.11. When I boot the system in my own admin account, with no login services enabled, nor any internet or cloud accounts enabled (e.g., Messages, Facetime, Mail, Calendar, ...
0
votes
0answers
145 views

Stop the Launch Daemon ftp.plist from being loaded on startup / login

For some reason, and I'm not sure this applies to every Mac / Yosemite user, ftp.plist gets loaded when I log in. If I run this in terminal when I first log in: $ sudo launchctl load ...
1
vote
2answers
134 views

launchd equivalent for Windows?

Using launchd on OS X, I can make commands/programs run at boot with launchctl in the CLI, so for example: launchctl submit -l someName touch /usr/local/someFile Would create someFile in /usr/local ...
0
votes
1answer
80 views

Launchctl - submit command instead of executable

I know it's possible to submit the path of a program to launchd via launchctl submit -l label [-p executable] [-o path] [-e path] -- command [args] But is it also possible to pass a command ...
0
votes
0answers
103 views

How to communicate with a LaunchAgent via Unix Sockets?

I'm trying to setup a LaunchAgent (running in the current user's UI context) that can receive "commands" like a server. The "commands" are sent by a LaunchDaemon running as "root" user, or some other ...
6
votes
1answer
3k views

OS X: LaunchDaemon not running: Service could not initialize

I used Apple's seemingly straightforward docs to create a LaunchDaemon to run a Node.js script I wrote. Here's the plist file. It's basically exactly a copy-paste from Apple's docs, set to run every ...
0
votes
0answers
42 views

Launchd Daemon with aqua session

I wanted to set up jenkins slave on some box running mac OS X to compile my swift project and it seems to be surprisingly hard. In order to achieve this i set up jenkins slave using JNLP. And i wrote ...
2
votes
0answers
143 views

Start Appium server at system boot (MacOS)

I'm trying to setup Appium server to stat automatically after system startup. Also I'd like it to restart after a crash. Appium was installed as a npm package and it launches and works fine when I ...
3
votes
1answer
1k views

How to start a service using Mac OSX's launchctl

Why does my configuration plist file not load as a service using launchctl? I am running OSX Yosemite, and I have read this excellent tutorial on using launchctl ...
0
votes
1answer
129 views

Starting Suricata with launchctl on Mac OS X

Using Mac OS X Yosemite 10.10.3. I'm trying to make Suricata start in daemon mode on boot with launchctl. Here is my /Library/LaunchDaemons/org.suricata.Suricata.plist: <?xml version="1.0" ...
0
votes
2answers
117 views

Unable to remove peruser launchd process

I am constantly getting the following messages in system log: com.apple.launchd.peruser.0 (homebrew.mxcl.memcached[PID]) Exited with code : 64 com.apple.launchd.peruser.0 (homebrew.mxcl.memcached) ...
1
vote
1answer
119 views

Running offlineimap via launchd doesn't survive sleep on OSX

I'm not very well versed in all things launchd but I wrote this plist file that periodically runs offlineimap to fetch new mail from IMAP servers: <?xml version="1.0" encoding="UTF-8"?> ...
1
vote
0answers
56 views

Launchd process stalls Firefox startup on Mac OS Yosemite 10.10.2

I have long wait times up to 2 to 3 minutes when starting web browsers Firefox and Safari. Looked at Activity monitor and saw "launchd" taking up 98% of memory. CPU Time was 1.40.93 at the time. I ...
0
votes
2answers
20 views

Service com.apple.quickook doesn't stop from restarting

Running Mac OS X 10.2.2 in MacBookPro model MacBookPro11,2. I'm having this issue that I could find using console application: A daemon named com.apple.quicklook deosn't stop from restarting after 0 ...
1
vote
1answer
4k views

It is safe delete OSX's /private/var/folders/* at reboot?

Want clean the /private/var/folders/* at the OS X boot, by creating an launchd entry. (AFAIK, the OS X doesn't supports the rc.conf rc.d - everything must be done by creating an entry for the ...
0
votes
1answer
25 views

Unable to refer to iCloud Drive in launchd plist

I have started keeping my AppleScripts in Script Editor's iCloud Drive folder, as oftentimes, I like to reuse or review scripts on multiple devices. Generally I love iCloud Drive. However, I have come ...
0
votes
1answer
209 views

Script to delete all non-admins with launchd or logout script on OS X

I've found a number of articles that touch on this subject but they are not running for me or perhaps because they are years old they do not work OS X 10.10 Yosemite. In short we run Deep Freeze but ...
3
votes
0answers
318 views

How can I diagnose why my launchd task isn't running on schedule?

I've read the launchd.plist man page, Is launchd supposed to pick up "missed" events?, and launchd seems ignore StartCalendarInterval on Yosemite but none of those have allowed me to ...
1
vote
0answers
217 views

Best way to avoid HDD head parking under OSX via bash script

After replacing the optical drive of my MacBook Pro (mid 2012) with a SATA-II HDD, I'm having trouble with the HDD's annoying head parking after short intervals of usage. Since I'm using the MacBook ...
1
vote
1answer
148 views

OSX Launchd /Library/LaunchDaemons

I have created a plist file (see below) and stuck it into /Library/LaunchDaemons/ . (It starts a virtualbox via a script that runs VBoxHeadless .) I can start the plist as user "nobody" sudo -u ...
3
votes
1answer
2k views

Increasing Yosemite maxfile limit for Application

I've been trying to up the maxfile limit and maxfileperproc limit on Yosemite, with no luck. I have created a sysctl.conf file in the etc folder, which has successfully increased the values when ...
1
vote
2answers
202 views

OS X: Run script at Login screen with FileVault on

How to run a script at Login screen (BEFORE user types password to log in)? I have tried launchctl and place the script under both: /Library/LaunchDaemons/ /Library/LaunchAgents/ Still the script ...
2
votes
2answers
5k views

com.apple.emond keeps getting restarted

My system log tells me that the Event Monitor is constantly getting restarted and I have no clue what the actual problem might be. system.log: Oct 19 21:03:44 funkymachinename emond[51201]: ...
9
votes
1answer
1k views

launchd seems ignore StartCalendarInterval on Yosemite

I tried to update Homebrew on time with launchd. My plist file is presented here: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" ...
0
votes
0answers
192 views

Launchd Failing to Launch: “Failed to exec(3) for some weird reason”

I have a very simple lanuchd task set to kick off a backup script at a certain time every day. I can run the command perfectly from the command line without any problems, but the following system log ...
0
votes
0answers
41 views

Run per-user specific launchd process as root

I need to figure out how to make a plist file for a certain user run as root. Since the user isn't root, the UserName string is ignored. I only want it to run for this one user, and no other users, so ...
1
vote
2answers
384 views

OSX launchd: No such file or directory

I'm trying to set up a simple repeating task with launchd on OS X. My plist file is in /Users/me/Library/LaunchAgents and all I want it to do is run the command node --version. My plist file looks ...
2
votes
2answers
190 views

How does GitHub Conduit launch itself at startup?

A program called GitHub Conduit (part of GitHub for Mac) runs in the background on my computer. If I kill it, launchd restarts it. The launchd manpage lists every location in which it looks for jobs ...
16
votes
5answers
35k views

Can’t launch daemon with launchctl in Yosemite

I have a launchd daemon placed in ~/Library/LaunchAgents that worked well in Mavericks. But it won’t start in Yosemite public beta. The daemon plist is like this (my username is darksair with UID ...
0
votes
2answers
121 views

How can I get a script to run constantly on Mac OS X?

I would like to do this: When the application VLC is open and I press the space bar, it pauses the video and an itunes starts to play. Then spacebar again would resume the workout video and pause my ...
0
votes
1answer
1k views

Launch a daemon after another daemon on Mac OS X

How one would create a dependency between two daemons launched on system start? I would like to launch sonar when the system starts but it requires mysql server to be already up and running. I ...
0
votes
1answer
212 views

Spaces in paths of LaunchAgents for launchd in (Mac) OS X

I try to add a LaunchAgent with a path set in WatchPaths that contains a space. I tried the plain path and I tried to escape the space character with a backspace as well as adding quotation marks ...
1
vote
1answer
369 views

Launching MAMP using LaunchDaemon not working in Mavericks

I followed the instructions from this page: http://blog.dannykey.com/automatically-launch-mamp-on-start-up/ to try to get MAMP starting at system start-up without a user logging in. I did this before ...
0
votes
1answer
156 views

How to run a launchd task every weekend once?

I am trying to run a ruby program as a cron. I have figured out how to run the ruby program from a launchd The problem is that I don't know how to say "Run the job once every Sunday". Below is my ...
0
votes
2answers
77 views

User-friendly wrapper or replacement for `at` command under OS X

I often want my computer to automatically add something to my to-do list at some point in the future. In some cases I want to add the same thing at regular intervals. In these cases I use OS X's ...
0
votes
1answer
222 views

terminal-notifier fails silently when called from launchd

I've created a script to update my package manager and post a notification via terminal-notifier. When run manually, it works fine, but when called via launchd (local to the user, in ...
1
vote
1answer
2k views

Launch daemon on startup as a specific user on Mac OS X (Server) Mavericks

I want to launch a CI server (TeamCity 8.1) on startup on a Mac OS X Server running Mavericks. I don't want the CI server to be launched by the root user but by another user on the system. The user I ...