Questions tagged [launchd]

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

Filter by
Sorted by
Tagged with
-1
votes
0answers
17 views

Find out login items [closed]

I know programs that hide and have a login item. This is then always carried out in secret. Can you use a terminal command to find out which app has a "Login Item"? They are usually not ...
0
votes
0answers
23 views

Know when a file is created (or saved) using bash

I would like to know if there is a command line program that can tell me when a file is created or saved. Suppose I am at ~/Desktop and I want to do something, for example run my_script, when I save (...
1
vote
1answer
23 views

Permissions errors when using launchd to run rsync between local drive and afp network drive

I am trying to sync a local directory to my NAS that is mounted via the afp protocol as a drive. I am using rsync. When I run the command from the terminal, it works fine. However, when I try to run ...
0
votes
0answers
16 views

How do I run a script when a particular bluetooth device wakes up?

I use a Microsoft Natural Bluetooth Ergonomic keyboard with my MBP. I remap the Windows & Alt keys on the Windows keyboard to ⌥ and ⌘, respectively, for the keys on both the left & right of ...
1
vote
1answer
47 views

Reproducing execution launchd execution environment

I have a script which runs flawlessly under a normal interactive shell, but which frequently has errors when run as a user LaunchAgent. Is there a way to manually, and ideally interactively, run a ...
1
vote
0answers
27 views

How to display Notification from a LaunchDaemon process?

I have a LaunchDaemon process that needs to run as root user. The process internally calls osascript to display some notifications. Notifications display fine when the process is run manually without ...
0
votes
0answers
5 views

Different dicts for different launchd jobs in the same plist?

I tried to use the following open.close.mail.plist <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www....
0
votes
1answer
19 views

Conditioning launchd scheduled job on file existence?

We have a scheduled job that we want to run on both our macOS and Linux hosts. On Linux, with systemd we can just use this: ConditionPathExists=/etc/this_file_must_exist ConditionPathExists=!/etc/...
0
votes
0answers
28 views

How to give permission to daemons launched with launchctl

One of the latest OS upgrades caused a script loaded by launchctl to fail for permissions. my script does this to mirror a mounted path into my disk: rsync -av --delete <mounted-path> <local-...
1
vote
1answer
74 views

Launch Daemon for NodeJS App Won't start on reboot

I've created the below launch daemon to run a nodejs program on startup (tiddlywiki in this case): <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//...
1
vote
0answers
39 views

Sleepwatcher needs to be relaunch after every boot on Catalina

I have a .sleep script that I launch with sleepwatcher everytime my MacBook Pro goes to sleep (by closing the lid). On Mojave, everything worked fine. Now on Catalina (10.15.5), every time I boot I ...
1
vote
2answers
83 views

Want launchd to run a script weekly, but it is running it daily instead

I wanted to write a simple launchd job that runs a script every Monday morning at 7:00 am. The goal is to pull an image from tapmusic.net that catalogs my last.fm listening habits from the prior week. ...
1
vote
2answers
80 views

launchctl plist has a stderr that talks about how getcwd operation not permitted so how do I fix it?

TLDR for those who googled and found this In Catalina, launchd can't read files or run scripts located inside your ~/Documents folder. Just avoid putting your scripts there and rewrite your scripts ...
1
vote
1answer
27 views

How do I cleanly remove old Juniper Pulse installation from Mac OSX?

The Console application on the Mac is continuously throwing log messages presumably because fragments of a previous install are still in place. I have tried Googling around for a solution and using ...
0
votes
0answers
35 views

launchd running php script fails under Catalina on exec diskutil

I have a php script that worked perfectly under Mojave from the terminal and as a launchd job. After changing to Catalina, the php script continues fine from the terminal, but the launchd job fails on ...
4
votes
1answer
183 views

Can I have launchctl output stdout/stderr from my application to the system-wide Unified Logging mechanism?

I have set up a custom .plist in ~/Library/LaunchAgents to run a process (offlineimap) on a periodic basis. I've specified both the StandardOutPath and StandardErrorPath keys to point to files in my ...
1
vote
1answer
659 views

What is could spawn tons of processes called AppleUserHIDDrivers over and over

I see 18 instances of the process AppleUserHIDDrivers running on my MacOS, according to the activity monitor, belonging to the user _driverkit. The parent process is listed as launchd. What could be ...
0
votes
0answers
22 views

Silence launchd's “Service only ran for [x] seconds. Pushing respawn out by [x] seconds.” log message

TL;DR: I have a LaunchAgent that is triggered with WatchPaths that runs a very simple/quick script and exits cleanly. But it ends up generating console log such as this: Apr 25 19:30:45 my-clever-...
1
vote
0answers
18 views

OSX Launch Daemon for Periodic Screenshots

I'm trying to figure out how to create a daemon that will take screenshots every 5 minutes on OSX. The daemon with launchctl seems to run under a separate session so the screenshots I'm getting right ...
0
votes
0answers
21 views

Is it possible to change the sandboxing of the sharingd process?

When attempting to access network shares on a Synology NAS I get an error indicating the original item cannot be found. In the system console there are messages from NetAuthSysAgent indicator that a ...
1
vote
1answer
29 views

make computer wake up at time

I'm working on a project that involves using launchd at a certain time. I have heard that launchd will only work if the computer is awake/logged in. What is the best way to insure that launchd will ...
0
votes
1answer
43 views

Run script through launch agent is failed

I try to run the next script through LaunchAgent: on run argv set current_path to POSIX path of ((path to me as text) & "::") set common to load script (current_path & "common.scpt") ...
2
votes
1answer
141 views

Launchd Wont Run Application

I made an app (tested it works) and I want to make it run every day at midnight. Here is my PLIST file: EDIT: after using @user3439894's code here is what I put in my PLIST <?xml version="1.0" ...
0
votes
0answers
24 views

Apple Catalina Error in PLIST, plutil -lint says its OKAY

plutil -lint /Library/LaunchDaemons/net.varela.wesley.borg.plist /Library/LaunchDaemons/net.varela.wesley.borg.plist: OK sudo launchctl load -w /Library/LaunchDaemons/net.varela.wesley.borg.plist /...
0
votes
1answer
98 views

How to use Launchd? [duplicate]

(sorry if this is a bad question. I am new to apple coding) I want to run a .scpt file at a specific time, once a day, every day using launchd (if there is a better way please tell me) I am running ...
0
votes
1answer
30 views

How to use Launchctl for schedule application

I try to work with Launchctl and have a question: How can I set up an application to run in a few minutes using Launchctl? (for example, open the program MyApp.app with arguments "hello" "world" ...
0
votes
0answers
18 views

How to use Launchctl for runing scheduled command [duplicate]

I try to work with Launchctl and have a question: I know there is a possibility to run commands directly (shell for example) with Launchctl, can someone please add an example on how can I do it with ...
1
vote
1answer
74 views

Can’t load plist. Launchctl says “Invalid property list”, tried plutil, SIP, permissions

I want to use the following plist to run a backup script under macos High Sierra. File name: com.pollux.backup.plist Content: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist ...
1
vote
0answers
31 views

problems resulting from launchd script running when computer is sleeping

I have a Bash script that copies a specified set of files/directories to a remote server via rsync. It is run by launchd as a Global Daemon every day at 3am. The computer is sleeping most of the time ...
0
votes
1answer
40 views

Run Script Atomically

I have a launchd task that runs a bash script periodically, and this works great. However, if I change the script while the task is running, either by editing it directly, or swapping it with an ...
1
vote
1answer
42 views

How to wait until internet connection, before launching “login item”

My Slack and a few other apps will automatically launch at login on my Macbook, since they are listed under "login items". However, some, like Slack, will launch before the internet is connected, and ...
0
votes
0answers
21 views

Is there a way to create a launchctl service using snap?

I am using snap to create a systemd service on Linux - I am wondering if there is a way to use snap to create a launchctl service on MacOS?
3
votes
1answer
133 views

How are brew services different from launchctl services?

On MacOS, how are brew services different from launchctl services? is there a way to use snap on a Mac to run services instead of brew?
0
votes
0answers
19 views

Why does launchd suddenly complain about error 78: Function Not Implemented? [long]

I have an old 2010 MBA which runs High Sierra. It is located at a condo which I visit for a few days each month. The machine runs 24/7 mostly to upload webcam photos to a host every four minutes, to ...
1
vote
1answer
169 views

running macOS UI based Application as root

I'd like to open a specific macOS application which require root privileges (uid=0 or gid=0) in order to access specific files. However, when trying to run with sudo directly I get the following error:...
0
votes
1answer
62 views

Can't authenticate using SSH key when running script via launchd

I have a Bash script that executes an rsync command to sync files with a remote server. #!/bin/bash rsync -auvzP --exclude=.bundle --exclude=node_modules --exclude=tmp '/Volumes/Norman Data/me/....
2
votes
1answer
57 views

Process called “ItYoingm” using over 90% CPU and over 106GB memory - root user

I have recently downloaded Catalina on my Macbook pro and every now and again my fan goes into overdrive, even when I'm hardly using any programs. I opened my Activity Monitor and there is a process ...
1
vote
0answers
61 views

Permissions problems with running rsync via periodic or via launchd in Catalina

So, I've got some scripts that use rsync to periodically backup folders on my MBP, but once I moved to catalina they stopped working when invoked by periodic or by launchd. This is clearly a ...
0
votes
0answers
259 views

Permissions issue automating a shell script in /usr/local/bin using launchd?

Goal: use a launchdaemon to periodically run a shell script Environment: macOS Catalina 10.15.3, macOS Server 5.9 I have a shell script to back up Open Directory in macOS Server: #!/bin/bash dst="...
2
votes
1answer
85 views

Catalina - find: .: Operation not permitted from launchAgent

I've created a launch agent that uses the find command to look in the downloads folder of a user files_to_remove=(`cd ~/Downloads/ && find . \( -name "*.csv" -or -name "*.pdf" -or -name "*....
1
vote
0answers
375 views

What is process apfsd?

It shows in Activity Monitor as "preventing sleep." I have occasion to check that list of processes preventing sleep fairly often, and I don't recall seeing that before. I would guess that it might ...
2
votes
0answers
84 views

Invalid property list

I'm trying to set up a UPS solution which should shut down my Mac automatically. I've followed these instructions: Protection from power failures! Mac, UPS, NAS & NUT/video. This requires to ...
1
vote
2answers
100 views

How to make ''sudo launchctl limit' change permanent?

I have a background job that failed due to too many open files error. To fix it, I have to kill the job, then run the following sudo launchctl limit maxfiles 10240 10240 before restarting it. Is ...
0
votes
2answers
83 views

is thre a way to find recent files with locate OR automatically update the database each time a file is created

I am on MacOS Catalina. locate is a great command but unfortunately, I have difficulties to find files which have been created for example one hour ago or ten minutes ago. It seems that I could ...
3
votes
1answer
48 views

How to delete directory content with launchd

I am trying to empty a directory at the end of the day, so I have written the following script: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "...
1
vote
1answer
21 views

launchctl list doesn't show StartInterval

The following is part of my .plist file: <plist version="1.0"> <dict> <key>Label</key> <string>org.myorg.foo</string> <key>ProgramArguments</key> ...
1
vote
1answer
85 views

How to disable xpc items from launchd?

I sometimes encounter various tasks for com.apple.xpc.launchd in the system logs that give errors like Service only ran for 0 seconds. Pushing respawn out by 10 seconds. or Service exited with ...
4
votes
2answers
232 views

Earliest way to disable wifi at login or boot

I'm running Catalina, and the OS will always turn wifi on at boot. I've been looking into methods to turn wifi power off when I login, and I've created a .plist: <?xml version="1.0" encoding="UTF-...
0
votes
0answers
17 views

Google Backup and Sync Keeps Exiting

This is a new problem: on both my laptop and desktop, Google Back and Sync keeps exiting. I'm using the current version. This doesn't make sense. How do I debug something like this? Is there a way I ...
0
votes
0answers
37 views

launchd uses UDP port 69. Why? [duplicate]

Why and what for launchd listens on TFTP port 69? How to prevent? $ sudo lsof -nP -i:69 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME launchd 1 root 23u IPv6 ...

1
2 3 4 5
12