如何在 MacOSX 上启动/启用“at”?

如何在 MacOSX 上启动/启用“at”?

我刚刚注意到at在 MacOSX 上的终端中提交的作业从未执行过:

$ atq
2   Fri Feb  7 12:07:00 2014
3   Mon Feb 10 10:36:00 2014
4   Sun Mar  9 09:59:00 2014
5   Mon Mar 10 13:39:00 2014
6   Tue Jul  1 10:25:00 2014
7   Mon Jun  2 22:00:00 2014
9   Thu Jun 26 13:51:00 2014
10  Thu Jul 24 08:29:00 2014
$ date
Thu Jul 10 09:22:29 CEST 2014

在 MacOSX 中,如何启用at作业执行?我正在运行 MacOSX 10.9.3。

模糊相关的链接和问题:

答案1

我相信这个答案将回答你的问题。引用相关部分:

To enable te needed `atrun` daemon, as `man atrun` says, execute:

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

as root (e.g. via `sudo`). Once you've done that, `/var/at/` will be the key directory (though the simplest way is to use `at` as root -- e.g., once again, by `sudo`!-).

相关内容