I am working on a CentOS server and schedule a task with command at
# echo "touch a_long_file_name_file.txt" | at now + 1 minute
job 2 at Wed Oct 31 13:52:00 2018
One minute later,
# ls | grep a_long_file_name_file.tx
a_long_file_name_file.txt
the file was successful created.
However, if I run it locally on my macOS,
$ echo "touch a_long_file_name_file.txt" | at now + 1 minute
job 31 at Wed Oct 31 13:58:00 2018
Minutes later, if it failed to make such a file.
I checked the version of at
on the CentOS server
AUTHOR:
At was mostly written by Thomas Koenig, ig25@rz.uni-karlsruhe.de.
2009-11-14
In contrast, the macOS version
AUTHORS
At was mostly written by Thomas Koenig <ig25@rz.uni-karlsruhe.de>. The time parsing routines are
by
David Parsons <orc@pell.chi.il.us>, with minor enhancements by
Joe Halpin <joe.halpin@attbi.com>.
BSD January 13, 2002
I found that at
, atq
, atrm
are not of GNU coreutils.
$ ls /usr/local/opt/coreutils/libexec/gnubin/ | grep at
cat
date
pathchk
realpath
stat
truncate
How could I install the latest version of at
on macOS and make it work?
at
,cron
, andperiodic
are "deprecated": developer.apple.com/library/archive/documentation/MacOSX/…at
is "deprectaed", but does not explain how to run a job once "in x minutes".