Questions tagged [launchd]

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

launchd is an open-source daemon intended to streamline and accelerate starting and stopping of processes on a *nix OS. It is intended to totally replace the following daemons or systems of scripts:

  • inetd/xinetd
  • init and init.d
  • rc and rc.d
  • atd
  • crond
  • watchdogd
  • SystemStarter

The wikipedia page is also a good basic launchd reference.

184 questions
80
votes
11 answers

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

Cron? Launchd? iCal?? If so, how?
Paul D. Waite
  • 6,434
  • 11
  • 49
  • 72
45
votes
8 answers

how to kill process in Mac OS X and not have it restart on its own

When I run sudo kill -9 [PID] with the proper process ID, the process stops but then is restarted and has a new PID. I'm trying to kill the mysqld process. How can I mimic the Activity Monitor in killing a process? In the Activity Monitor, when you…
Hristo
  • 1,179
  • 4
  • 14
  • 21
35
votes
5 answers

How do I run a launchd command as root

I have the following launchctl command as a .plist file. It's loaded and set to run once a day but, it needs to run as root and I'm not sure how to verify this. Also, this cron job basically CDs into a directory and runs a command. I'm sure…
Emmanuel Mwangi
  • 453
  • 1
  • 4
  • 5
28
votes
8 answers

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 501)
MetroWind
  • 551
  • 1
  • 8
  • 15
27
votes
5 answers

Setting environment variables in OS X for GUI applications

How does one set up environment variables in Mac OS X such that they are available for GUI applications without using ~/.MacOSX/environment.plist or Login Hooks (since these are deprecated)?
Percival Ulysses
  • 601
  • 1
  • 6
  • 13
18
votes
2 answers

Running app on MacOSX Mountain Lion: Job failed to exec(3) for weird reason: 13

I tried to run an app on my mac but it quickly closes, I've checked the Quarantine flag but that was not the problem, I checked Console and here's the error information: 9/24/12 1:44:19.343 AM com.apple.launchd.peruser.501[150]:…
Shahin
  • 491
  • 1
  • 3
  • 8
15
votes
2 answers

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 rebooting, so for of the zombie process, $ ps…
hatmatrix
  • 844
  • 2
  • 10
  • 21
15
votes
6 answers

How to register an agent with launchd

I’m unable to schedule a periodic launch with launchctl/launchd on OS X (Leopard). Basically, I’m unable to find a step-by-step list of instructions on the web and the intuitive approach doesn’t work. The sync.plist file:
Konrad Rudolph
  • 7,601
  • 6
  • 29
  • 36
14
votes
1 answer

How to get a launchd plist to diretly run a complex 1 line bash command?

I have a somewhat complex bash command which includes some pipes and an if-then-else clause, not to mention calling system program (such as grep) with multiple parameters. Is there a way to create a plist that launchd will load and run this complex…
UrEl
  • 841
  • 2
  • 11
  • 14
13
votes
1 answer

com.apple.launchd: com.apple.launchd.peruser error

It's been a couple of days I am reading these errors in the system log file. 25/11/11 21:31:43,373 com.apple.launchd: (com.apple.launchd.peruser.32697[92747]) getpwuid("32697") failed 25/11/11 21:31:43,374 com.apple.launchd:…
nick2k3
  • 255
  • 2
  • 4
  • 8
12
votes
2 answers

Common Mac OS folders/settings to check (when trying to get rid of a pesky self-launching app)

If there's an app that starts up by itself, what would the most efficient places to look for it be? Does anyone have a nice comprehensive list of where to check for Startup Items, Login Items, Login Hooks, Cron, kernel extensions, etc... At this…
username
  • 1,368
  • 1
  • 19
  • 24
11
votes
2 answers

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 http://nathangrigg.net/2012/07/schedule-jobs-using-launchd/ I have created a correct…
almel
  • 231
  • 1
  • 3
  • 6
11
votes
3 answers

removing startup item from com.apple.launchd

I installed a program a few months ago, it had a startup option that I did install. Later, I decided to remove the program, but it seems to have left the startup script or item even after I uninstalled it.... and its trying to start every few…
Peter
  • 253
  • 1
  • 2
  • 7
9
votes
1 answer

launchd seems ignore StartCalendarInterval on Yosemite

I tried to update Homebrew on time with launchd. My plist file is presented here:
Minsheng Liu
  • 293
  • 2
  • 7
8
votes
0 answers

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 diagnose why my launchd task is not running. I have a task…
Camden Narzt
  • 1,099
  • 8
  • 18
1
2 3
12 13