I've written a Python script that I need to execute at a certain time after another script runs. I found the at
command, and after a bit of digging, I tried the following (broken into multiple lines for readability):
/private/var/folders/w9/6q0rjl6n4yv859fpxbg4123w0000gn/T/S10/fm-git.py
--filename chiv-lib --repository /Users/chuck/Projects/chivalry/chiv-lib/
--path Chivalry/ --comment "test" | at 2:52pm
This ran the script immediately. So I tried
at 2:53pm
> /private/var/folders/w9/6q0rjl6n4yv859fpxbg4123w0000gn/T/S10/fm-git.py
> --filename chiv-lib --repository /Users/chuck/Projects/chivalry/chiv-lib/
> --path Chivalry/ --comment "test"
> ^D
But the time came and went and the script didn't execute. After the above, at -l
outputs the following:
13 Mon Nov 27 02:53:00 2017
12 Mon Nov 27 14:52:00 2017
This is on macOS High Sierra. Is at
the right utility for this? If so, how can I get it to do what I want here?
Best Answer
Let's see, on Mac OS X (as this hardware is too old to run macOS) plus with
myat
because I can never remember the date formatat
wants...... why is there a job from 2016 hanging around??
Uhhhh...maybe the man page for
at
will help?Meanwhile over in
atrun(8)
we find...Gosh. Let's try that...
And then we wait like a minute or two...
Looks good once you turn it on (warning may drain battery or precious cpu slices...)