1

I did as per the instructions in Making "at" work on macOS (see also SuperUser)

launchctl load -w /System/Library/LaunchDaemons/com.apple.atrun.plist

to enable at on macos and now

echo 'date > ~/at-date' | at 1

works, but only if I click OK on this scary dialog that pops up after I hit return:

gui confirmation

If I click Don't Allow, I get

at: cannot open lockfile /usr/lib/cron/jobs/.lockfile: Operation not permitted

The effect of the GUI answer persists for a few minutes (i.e., I am not asked the question and at either works right away or fails right away).

How do I make the "OK" answer (1)permanent and (2)for all apps?

PS When I run at from Python using subprocess, I always get the .lockfile error, and I am never asked the GUI question.

sds
  • 1,596
  • 2
  • 14
  • 21
  • @Christopher: `at` and `cron` are venerable tools available on all unix-like systems. I see no reason to switch to a mac-specific functionality. – sds Aug 26 '19 at 16:06
  • 1
    See https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/ScheduledJobs.html – Christopher Aug 27 '19 at 12:54
  • @Christopher: so, instead of a simple command line, I now need to create an XML file?! – sds Aug 27 '19 at 14:09

0 Answers0