651 questions
0
votes
1
answer
175
views
How do I fix launchctl "Bootstrap failed: 5: Input/output error"?
I have written a shell script that I want to run every time I log on to my Macbook, and I'm trying to execute it via launchd.
My script is not a persistent daemon, it's supposed to write some text to ...
1
vote
1
answer
199
views
PHP Script not timing out while using curl_exec( )
I have a php shell script that runs at scheduled intervals via launchd. The script has a 2 minute php timeout, but I understand that time spend in curl_exec( ) doesn't count towards that. But I also ...
0
votes
0
answers
55
views
MacOS Launch Daemons
I am trying to create a Launch Daemon that launches whenever I log in. I know that launch agents are better suited for this job, but I want to accomplish it with a launch daemon instead because It's ...
0
votes
0
answers
216
views
When starting a launch agent using SMAppService, how do you force it to update the full path of the agent?
I'm creating a launch agent using the following method:
@implementation AppDelegate {
SMAppService *agentService;
}
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
...
0
votes
0
answers
83
views
Personal LaunchAgent no longer works correctly in MacOS 15.x - appears to be due to iCloud desktop?
I have a launchagent that I've been using for well over 10 years. Once a week it cleans up my desktop, moving any files it finds to a "Desktop_Archive" folder.
Unfortunately, while the ...
1
vote
1
answer
142
views
debugging a MacOS launchd script
I have run out of things to look for or don't know where to look anymore.
I have a perl script that checks a particular website to see if it has changed, and throws an alert one way or another. ...
0
votes
1
answer
145
views
chmod Command Fails with Exit Code 1 When Run from LaunchDaemon on macOS
I am facing an issue with a bash script run by a LaunchDaemon on macOS, which is supposed to change the permissions of the Google Chrome application at specific times. The script runs correctly when ...
1
vote
0
answers
69
views
MacOS + launchd + python + mariadb = server connection fail
I am new to this group. Hopefully someone can provide some guidance to solve my issue... I am attempting to schedule the running of my python program on my Mac using launchd.
I have hit a roadblock ...
0
votes
1
answer
74
views
Why can't my launchdaemon find the bash commands?
I'm writing a bash script that enables and disables sleeping on my MacBook based on whether my headphones are connected by bluetooth or not, so I can close the lid and listen to music without the ...
2
votes
0
answers
72
views
LaunchD spawning two instances of LaunchAgent
I have this application that is divided in 3 parts.
A server that handles all the networking code
A agent that handles all System related code
A manager (NSApplication) to interact with the other two ...
0
votes
0
answers
129
views
MacOS App: How do we launch bundled helper program from main application?
I would like to achieve simple thing but struggling for the whole day. :(
I made a simple macOS app. In AppDelegate, applicationDidFinishLaunching, I would like to execute a helper program which is ...
0
votes
0
answers
473
views
Mac LaunchAgent with full disk access and caffeinate
I have a script that I would like to run every day at 4 AM. It downloads data to my user folder, fits some models, and saves files within my user directory. The script is a shell script, with one ...
-1
votes
1
answer
70
views
2. Bash script runs from Terminal but not from launchd
The script sorts the download folder into folders with date.
#!/bin/bash
eDate=$(date +%s) #Epochal date
cDate=$(date +%Y-%m-%d) ...
0
votes
1
answer
74
views
Running Typescript from Launchd
Updated; I found the path to npx using type npx
I would like to run a TypeScript script from a launchd.
I'm successfully running the script directly using /usr/local/bin/npx ts-node /path/to/script.ts
...
1
vote
1
answer
3k
views
How do I start the ssh-agent at boot (or login) using Launchd?
There's a plist in /System/Library/LaunchAgents/com.openssh.ssh-agent.plist. I've spent a couple hours trying to get it to start at boot/login, but I have had no luck yet. Most of my time has been ...