Hot answers tagged

6

I had the same issue and it was solved by adding the ProcessType tag. <key>ProcessType</key> <string>Interactive</string> I had been looking at this issue from all kinds of angles comparing cpu/gpu usage, attributed system resources etc (as you must have as well) and it just wasn't apparent WHAT THE DIFFERENCE was, ie why ...


6

A fresh system install, with default parameters is configured with the following system wide file limits: Kernel Max Files: 12288 Max Files per Process: 10240 Current kernel sysctl parameters can be viewed with sysctl command: $ sysctl -a |grep kern.maxf kern.maxfiles: 12288 kern.maxfilesperproc: 10240 Now let's check limits values, using ulimit command:...


5

You cannot use $HOME in these keys. You'll need to use the work-around shown in this answer: how can I use $HOME, ~ or environment variable in plist file of LaunchDaemons And then use ordinary shell scripting to redirect standard out and standard error to locations within $HOME. I.e. use a command similar to: command >$HOME/launchd.stdout.log 2>$...


5

PreLoginAgents macOS supports the ability to run graphical applications pre-login: Running Agents Before Login Most software that displays a user interface does not run prior to the user logging in. However, in some rare cases, it may be necessary to create a graphical agent that does. By default, OS X does not allow any application to draw ...


4

You can't use $HOME in the plist but you can configure it easily enough. Once the plist is loaded on the proper computer (lets assume it is at ~/Library/LaunchAgents/local.testing.plist for the sake of discussion) All you need to do is enter two commands at the command line defaults write "$HOME/Library/LaunchAgents/local.testing.plist" \ StandardOutPath ...


3

I think the Energy Saver suggestion is a good place to start:  » System Preferences » Energy Saver » Schedule and set it for, say, 30 minutes before you want to leave for work. However, I would not schedule it to go back to sleep unless you know that it has actually succeeded in ejecting the disk. Otherwise you might have the disk not eject for some ...


3

I want to view the status of a service in macOS using launchctl Hi, to view the status, use print: launchctl print system/org.apache.httpd Syntax is: launchctl print <domain>/<item> Domain can be: `system/<service>` `user/<UID>` `pid/<PID>` `session/<asid>` Various combinations and examples below: Use: ...


3

WatchPaths doesn't appear to be able to watch a sub-directory recursively, so the best you can do with it is watch a single directory's activities. You might want to take a look at Folder Actions, they're discussed in detail in this blog post titled: Setup OS X Folder Actions to Know When a File is Added as well. Another alternative is to use a CLI tool ...


3

Launchd does not perform word splitting. Remove the escape characters \ from the following line- <string>/Users/rhiannon/Library/Application\ Support/Script\ Testing/test-launchd.sh</string>


3

I suggest that you use an absolute path in ProgramArguments, so <key>ProgramArguments</key> <array> <string>python</string> would become <key>ProgramArguments</key> <array> <string>/usr/local/bin/python3</string> .......... Your PATH variable is not correct. Change it ...


3

The currently accepted answer is a bit hard to follow with all of its updates. Here's a short summary of what currently does and doesn't work, plus a new tip. Adding scripts or binaries to the "Full Disk Access" list no longer works. The only thing that works is adding an actual macOS app. As Channing mentions, Automator.app, Script Editor, or Platypus can ...


3

LaunchAgents are basically the same as LaunchDaemons, except that: LaunchAgents runs only after the user Logs in, process runs on the Logged in UID (User ID) with the logged user privileges. Process can interact with the logged user via GUI. LaunchDaemons runs on boot time, before the GUI is up, during the progress bar on the boot screen. It run as root, ...


3

Looks like kernel is hard coded to 2500 in param.c #if CONFIG_EMBEDDED #define NPROC 1000 /* Account for TOTAL_CORPSES_ALLOWED by making this slightly lower than we can. */ #define NPROC_PER_UID 950 #else #define NPROC (20 + 16 * 32) #define NPROC_PER_UID (NPROC/2) #endif /* NOTE: maxproc and hard_maxproc values are subject to device specific ...


3

Edit start You got it all correct except for enclosing your <dict> element inside an <array> element. Your script will run every minute from 21:00 to 21:59 with the following as your StartCalendarInterval key : <key>StartCalendarInterval</key> <array> <dict> <key>Hour</key> ...


3

So I found a relevant answer here: Cron job keeps running, not in any crontabs I don't think this question should be removed because this seems to be relevant to Catalina, even though it seems to be user error. Explanation: The root crontab had been edited at some point, with cron jobs that I created 6 years ago on my computer (I may have done this ...


3

/Users/mark/Documents/ is a protected user folder (as Downloads and Desktop). Usually you can add applications to System Preferences > Privacy & Security > Security > Full Disk Access to enable access to these folders. Terminal is already added probably - the reason why no error is shown executing the script manually. Change the destination of the log ...


3

You may be asking two different things, but in the last paragraph you said: The ultimate goal is to prevent the system from automatically logging into a network Prevent System From Automatically Logging Into a Network: I think the way to accomplish that is to un-check (disable) the Auto-Join feature for each WiFi network name/SSID that's stored. System ...


3

Shell globbing (<string>/tmp/test/👉*👈</string>) is not supported by launchd! You can either remove the whole folder test <string>/tmp/test</string> or launch a shell script rmtestcontent (in the example /usr/local/bin/rmtestcontent) with the content: #!/bin/bash /bin/rm -fr /tmp/test/* with the plist: <?xml version="1.0" ...


2

Check the manpage (man launchd.plist) to see if NetworkState is implemented. For me, on macOS Mojave, it is not: KeepAlive <boolean or dictionary of stuff> This optional key is used to control whether your job is to be kept continuously running or to let demand and conditions control the invocation. The default is false and therefore only demand ...


2

How about an old school bash script, called by .bash_profile and .bashrc? i.e. in your .bash_profile/.bashrc you can have: # ... bash /home/<user>/run.sh & And in your run.sh you can sleep in a loop and activate the app.


2

It is blocked by one or more of the extensions it installs: FileProtect.kext, SelfProtect.kext, TMProtection.kext You should always use Bitdefender's uninstaller at /Applications/Bitdefender/BitdefenderUninstaller and not these other apps you mentioned. Follow the instructions at https://www.bitdefender.com/consumer/support/answer/1784/ If that doesn't ...


2

sudo pkill -f cron The LaunchDaemon has a keepalive section in it that will immediately restart it.


2

NOTE: I stumbled into what looked like a more direct answer, presented below, but @abc's method has proven more accurate over the course of the day. I suspect there may still be a good way to use queries in pmset to accomplish this fairly directly (perhaps by combining more than one indicator), but I'll probably only pursue that further if I notice any edge ...


2

This should keep waiting until the screen is on: set screenOff to true repeat until screenOff is false set screenOff to (do shell script "ioreg -c AppleBacklightDisplay | grep dsyp") contains "\"dsyp\"={\"min\"=0,\"max\"=2,\"value\"=0}" end repeat display dialog "Is now a good time to back up?"


2

You can do this by running the command: launchctl list In the first column of the output, you'll find the PID. If this is a number, the service is running - if it is listed as "-" it is not running. Similarly you can check a single daemon like this: launchctl list <daemon> it will an output with various information - one of the lines looking like ...


2

Dynamic Paths On macOS, a process asks the operating system where to save specific types of files using the NSWorkspace method URLForDirectory:inDomain:appropriateForURL:create:error:. There is a CoreFoundation C equivalent function for this method. This approach mimics the goals of the XDG Base Directory Specification on other platforms. Typically /...


2

This is what Adobe support say - "You need to close all adobe applications when not in use from the activity monitor at last close adobe IPC monitor." - "We suggest to consumer close all adobe applications then close adobe IPC broker. If they not do so then all process again comes up." However, after killing all the other Adobe processes, the following ...


2

The first column displays the PID of the job if it is running. The second column displays the last exit status of the job. If the number in this column is negative, it represents the negative of the signal which stopped the job. Thus, "-15" would indicate that the job was terminated with SIGTERM. Those can be either Unix Signals and/or BSD Signals. man ...


2

I think this is a bug in launchd. If I take out the hour designation, it fires every minute. But if I restrict the plist to only 9pm, then it only fires once. Update This is what I tried (with the hour changed to ’12’ because that’s the current hour when I tried to test it). The ’test.txt’ file never gets created. <?xml version="1.0" encoding="UTF-8"...


2

Immediately after removing the service you won't be able to find the service name in a distinctive and editable file. It's probably hidden in some cache. After a reboot you should be able to remove its traces by performing these steps though: Search for the name of the non-existent service to remove in the files of this directory: /var/db/com.apple.xpc....


Only top voted, non community-wiki answers of a minimum length are eligible