Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
1 vote
1 answer
375 views

Can a macOS launch agent be run as a user that is not the 'active' user?

I have multiple users on a single iMac. They stay logged on, but put the display to sleep via a hot corner when finished. After a short time, a password is required and this allows them to switch ...
Crashmeister's user avatar
3 votes
1 answer
4k views

How to schedule a script to run automatically even if Mac is sleeping?

I'm really struggling with this. Basically I want to run a Python script every 3 hours on my Mac. Even if I'm not using the Mac. So even if the Mac is asleep I want it to wake up and run the script. ...
kitchen800's user avatar
0 votes
0 answers
427 views

How to schedule a py program on mac to run every 60 minutes (under a specific folder)

I am new to python and I have written my first program and run it a few times in the day. The file is called quran_review_scheduler.py in a folder under my user directory 'usr/dev/python/...
Siraj's user avatar
  • 101
1 vote
0 answers
162 views

launchd script never runs again after sleep

The script specified in my launchd configuration works correctly (runs every 10 seconds) so long as my computer does not go to sleep. Once it does, I have to reload the launchd configuration. Here is ...
maxedison's user avatar
  • 249
1 vote
2 answers
5k views

Remove build in Apache httpd on macOS (OSX)

I have a Mac Mini running a private server from home. It is running macos High Sierra (osx) and and previous used "Apple Server" to manage my websites (using the build in apache httpd). But since ...
Ricki Runge's user avatar
1 vote
1 answer
2k views

Python Script/Unix Executable Runs in Terminal, Fails as Cron/Launchd job

I'm trying to configure launchd to trigger a python script/unix executable (i.e. python script with shebang line). When I load the .plist file (below), launchctl shows a status of 127 meaning, "The ...
JMikes's user avatar
  • 121
1 vote
0 answers
564 views

Using Launchd for an Applescript Application

I created an Applescript Application (called Print Release) that runs without issue (code below): do shell script "rm -R /Users/<account>/release.zip; rm -R /Users/<account>/release; curl ...
krees's user avatar
  • 33
1 vote
1 answer
544 views

launchd job not on list, but still running

I have a launchd job that is running every two minutes, but it is not on the sudo launchctl list. I was changing the plist file, both the name of the file, and the Label key. I didn't unload it ...
dmgig's user avatar
  • 177
1 vote
0 answers
120 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 ...
mheavers's user avatar
  • 237
3 votes
0 answers
701 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 ...
al0's user avatar
  • 31
1 vote
0 answers
103 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 ...
Richard Gabelman's user avatar
0 votes
2 answers
38 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 ...
tbennett's user avatar
  • 145
0 votes
0 answers
144 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 ...
sacrificed_walrus's user avatar
1 vote
1 answer
2k 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 ...
user324462's user avatar
0 votes
2 answers
2k 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: <key>...
mmmm's user avatar
  • 121
2 votes
1 answer
1k 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 ...
Eric Milas's user avatar
3 votes
1 answer
3k 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 ...
TheNextman's user avatar
1 vote
2 answers
801 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 ...
EasilyBaffled's user avatar
1 vote
0 answers
3k 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 ...
straw's user avatar
  • 19
3 votes
2 answers
3k 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 permissions:...
jason's user avatar
  • 261
7 votes
1 answer
15k 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 ...
mr.VVoo's user avatar
  • 241
0 votes
2 answers
592 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" encoding="UTF-8"?>...
Dave Albert's user avatar
3 votes
1 answer
5k views

How do I stop this message?

I’m on a Mac running OS X 10.6.x and I’m seeing this launchd error message repeated constantly in Console.app: How can I stop this error message? 3/3/12 3:35:03.002 PM com.apple.launchd.peruser....
Lars's user avatar
  • 77
9 votes
1 answer
8k views

inotifywait alternative command for Mac?

Something like $ macwatch dir_or_file cmd_to_execude_when_arg1_is_changed during which I do not have to write XML. I am aware of https://stackoverflow.com/questions/1515730/is-there-a-command-like-...
Loren's user avatar
  • 357
1 vote
1 answer
1k views

launchd WatchPaths directive stopped triggering job

I have a custom launchd job setup to run when a directory changes. It has been running for quite some time now, and up until recently (July 28, 2011) it has been working perfectly. I just realized ...
joxl's user avatar
  • 173
4 votes
2 answers
3k views

Launchd execute command when folder contents modified or changed

For the past two days i've been trying to get a launchd plist to execute a script "program" when the contents of a folder on my desktop contents have modified or changed. I've gone through tons of ...
ThomasReggi's user avatar
0 votes
1 answer
1k views

Mac - Run script on startup and another on shutdown

I'm trying to figure out how to get two shell scripts to run automatically. One script to run when the mac is turned on. And another to run when the computer is about to shut down. I'm guessing for ...
RyanJM's user avatar
  • 145
2 votes
1 answer
1k views

Using launchd for short non-daemon tasks

I want to create a "startup item" in os x. All of the recent documentation suggest that launchd should be preferred over traditional Startup Items. However, launchd seems to be geared towards ...
jjs's user avatar
  • 123
1 vote
2 answers
1k views

Mac Leopard Launchd Daemon created with Lingon wont work

First off: Im absolutely new to Mac, so the problem might be really really basic. I have been trying to set up a Launchd Daemon to run at startup to run a Service via Mono.Frameworks. I used Lingon ...
Joe's user avatar
  • 11
0 votes
2 answers
581 views

MDS Worker Not Found

I've removed MDS worker (to get rid of spotlight). In my console it looks like launchd is trying to find it. Anyone know how I could stop launchd for searching for spotlight? (ha) 10-12-10 9:39:27 AM ...
Paul Ferderbar's user avatar
0 votes
1 answer
1k views

Can you have a script run whenever you machine wakes up from sleep and/or when the screensaver unlocks? [duplicate]

Possible Duplicate: Automatically run a program when Mac wakes from sleep I'm interested in both.
zekel's user avatar
  • 1,721
2 votes
3 answers
8k views

Setting environment variables in OS X /etc/launchd.conf

I'm trying to set some env variable in OS X 10.6 (/etc/launchd.conf) setenv M2_HOME /usr/share/maven setenv M2 $M2_HOME/bin setenv MAVEN_OPTS '-Xms256m -Xmx512m' M2 and MAVEN_OPTS are not working. I ...
al nik's user avatar
  • 201
8 votes
1 answer
13k views

Stop a runaway launchd process on OS X Leopard

I created a launchd .plist file to in order to have a python script run every hour. I ended up editing and later deleting the .plist file ( in /Library/LaunchDaemons )... but somehow launchd is still ...
CaseyIT's user avatar
  • 3,361
2 votes
2 answers
4k views

Creating a Mac OS X launchd plist for vpnd

I need to create a launchd plist that causes vpnd to launch at startup. vpnd works fine when invoked from the command line, but I can't figure out how to make a plist that does the same thing. Can ...
michaelmichael's user avatar
4 votes
4 answers
11k views

How to load system-wide daemon on Mac OS X

I'm trying to load my daemon-app with this command launchctl load /Library/LaunchDaemons/myPlistFileName It works fine, but only while my user is logged in on system. How can I load my deamon-app, ...
user avatar
1 vote
2 answers
3k views

Mac OS X: How do you set ipfw rules on startup?

How do you apply a list of ipfw rules at startup on Mac OS X? i.e. I have a list of rules like these that I'm applying manually. sudo ipfw add 00100 ... sudo ipfw add 00101 ... sudo ipfw add 00102 ....
John Douthat's user avatar
36 votes
5 answers
66k views

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 ...
Emmanuel Mwangi's user avatar