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

1
vote
0answers
41 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
33 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 ...
0
votes
0answers
15 views

Run Launchctl as root programmatically

I'm trying to start our service using launchctl from OSX app as root programmatically, but I get error status -60031. I can run without problems the command in Terminal: sudo launchctl load ...
0
votes
1answer
139 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
54 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 ...
0
votes
0answers
25 views

How is a basic daemon made on OSX?

I have an OSX system that I'd love to have some daemons set up on that will automate the updating of all of my console utilities. How would I go about creating and running such daemons? I'd also like ...
1
vote
2answers
794 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]: ...
7
votes
1answer
333 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
92 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
34 views

Creating and running a launchd daemon

I'm trying to follow along w/ the tutorial located here: http://www.tuaw.com/2014/06/11/how-to-keep-homebrew-and-xquartz-updated-automatically/ I've properly set up all of the script files, but am ...
0
votes
0answers
20 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
1answer
81 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 ...
1
vote
1answer
37 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 ...
5
votes
3answers
5k 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
88 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
266 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
56 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 ...
0
votes
0answers
59 views

use of UserName in launchd.plist

In Docs it is mentioned as UserName key will be applicable when launchd is running as root. Can we go ahead and include UserName key in launched.plist of LaunchAgent and load the Agent from a ...
1
vote
1answer
153 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
64 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
0answers
29 views

How to schedule an app to launch on system startup in OSX from command line?

I have seen answers where they recommend using launchctl. However, launchcd is meant for running services which is supposed to continue to run in background. It seems launchcd also relaunches the ...
0
votes
2answers
47 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
86 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
932 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 ...
0
votes
1answer
324 views

Mac OS X - can't kill running process

So I've sudo launchctl unloaded a particular app that I need to disable for debugging purposes. The system is live and can't be rebooted unless absolutely necessary. So after unloading the launch ...
0
votes
2answers
90 views

How to tell OS 10.9 to do something whenever I save in a certain application?

How can I automatically execute a shell command, AppleScript or launchd task whenever I "Save" within a specific application? OS: Mavericks
1
vote
1answer
771 views

OSX Mavericks: How can I make a webserver launch at boot and listen to port 80 without running the webserver as root?

According to Apple's launchd documentation: [launchd] Eliminates the primary reason for running daemons as root. Because launchd runs as root, it can create low-numbered TCP/IP listen sockets ...
0
votes
2answers
380 views

Jenkins and provisioning profiles

I'm trying to set my MAC to connect to Jenkins and be ready to build automatically. I've managed to create service that connects to Jenkins, but something is wrong. This is my plist file: ...
0
votes
0answers
56 views

Scheduling a job using launchd to run on the last day of every month

I am using Mac OS X Server 10.8.3. I want to schedule a job using launchd so that the job will execute at 2:00 pm on the last day of every month. How can I schedule this through a plist file? I have ...
0
votes
1answer
252 views

Throttling respawn messages to terminal with launchd: is this normal?

I have a launchd agent set up using the WatchPaths feature. It looks something like <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" ...
0
votes
1answer
63 views

How to use launchd's WatchPaths to keep two files in sync

Background: the Mac OS X plist format is binary by default, which is not very good for things like tracking with git. There is a command plutil -convert which can convert back and forth from binary to ...
0
votes
2answers
350 views

Packet filter logging [currently with tcpdump in background as root]

I am running OS X Mavericks and use the "packet filter" firewall. However, it seems that "pflogd" is not available. I found that you can create an interface named pflog0 and then use tcpdump to see ...
1
vote
1answer
132 views

Launchd alternatives

I am writing an application that uses a library that will not work when the application is run as a launchd daemon. There is a bug in the library where it will throw a bus error when used from a ...
0
votes
1answer
183 views

How to start a plist agent running as root at boot

I have installed nginx via homebrew, by default it provides a plist which is symlinked from ~/Library/LaunchAgents and running launchctl load ~/Library/LaunchAgents/nginx.plist starts nginx as my user ...
2
votes
1answer
2k views

Causes of: com.apple.launchd.peruser.501: Exited with code: 1

A subset of our users are reporting that our application refuses to run (bounces once in the dock, and then closes). If we drill into the application bundle (/Application.app/Contents/MacOS) and ...
0
votes
0answers
725 views

Launchd Exited with code: 1

I have been spending way too much time trying to figure this one out. My launchd job keeps giving me the error "Exited with code: 1". Here is the plist: <?xml version="1.0" encoding="UTF-8" ...
0
votes
2answers
94 views

Automating python script on a mac not running

I have tried to have this question answered twice now(1, 2). While both were informative none of the solutions have worked, and I don't know why. The first solution was to use launchctl the second was ...
0
votes
1answer
302 views

Is it possible to stop a service through launchd if the service is started manually?

I am using launchd to start mysql on boot, it is working fine. I am able to stop and start the service using 'launchctl unload' and 'launchctl load' commands. Also I am able to start the service by ...
0
votes
2answers
392 views

Is there something wrong with this launchd plist? Not working, but no error shows up in logs

I've tried this plist file in both /Library/LaunchAgents and /Library/LaunchDaemons but neither seem to work. I can run the shell script it's supposed to call from the command line and it works fine. ...
1
vote
0answers
1k views

Bittorrent clients won't open at all, is my ISP throttling them?

I noticed that the bittorrent client that I normally use, uTorrent, stopped launching. The icon would pop up on my dock for about 2 seconds, then proceed to disappear and nothing would happen. I have ...
0
votes
1answer
963 views

Can I use cron or launchd to run a bash script without being logged in?

I'd like to have a simple bash script run (regardless of whether anyone is logged in or not) akin to putting it in /etc/cron.daily/ on Linux, but on Mac OS X Mountain Lion 10.8.4. If it's possible, ...
0
votes
1answer
642 views

How to start a process with a predefined (in case it is unused) PID?

Is it possible to start/run a process with a predefined PID? In Linux or in OS X (or BSD)?
1
vote
1answer
55 views

launchd - how to get name of file changed

I want to use launchd to kick off a script to backup changed files. It looks like it should work for what I want to do, but I don't know how to pass to my script that launchd starts, the path of the ...
0
votes
1answer
1k views

Exited with code: 1 Error with launchd

I am trying to run a job with launchd which runs a shell script that creates a zip file I then backup. I am receiving the error: 6/26/13 5:04:37.992 PM com.apple.launchd.peruser.501[162]: ...
0
votes
1answer
74 views

Phantom LaunchDaemon process (OSX)

I created a LaunchDaemon a while back to start a shell script I had written. It looks like someone deleted the .plist from /Library/LaunchDaemons. In my system logs (/var/logs/system.log), i see ...
1
vote
2answers
1k views

OSX run script to mount sshfs at login with a plist file

I've read through the man pages for plist and launchd.plist, as well as posts about using plist files to run scripts at login; but I can seem to get things working. My script location and ...
1
vote
1answer
1k views

Why does launchd keep killing processes

I've noticed my system.log is getting flooded with messages like this: May 5 12:56:08 macpro com.apple.launchd[1] (com.apple.qtkittrustedmoviesservice[8568]): Exited: Killed: 9 May 5 12:56:08 ...
2
votes
1answer
5k views

Start Jenkins slave on Mac OS X as LaunchDaemon

I'am trying to start the jenkins' slave.jar on a Mac OS X 10.8.3 using a Launch Daemon so that it runs right after the machine is started. But I'm experiencing a mysterious problem: The LaunchDaemon ...
4
votes
1answer
7k views

How to restart launchd OS X without rebooting?

When I run Zotero/Firefox, they often crash and I am left with zombie processes; after this I cannot open new instances of Zotero or Firefox. I want to get rid of these zombie processes rather than ...
0
votes
2answers
126 views

Scheduling LaunchD for every other week

I would like LaunchD to launch a script every other week. The following works fine for every week, but how can I schedule it to only run every other week? <?xml version="1.0" ...