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:
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.
