如何重新安排 at 作业以提前运行?

n.r*_*.r. 4 scheduling at

假设我安排了一个at作业在 3 小时后运行:

$ echo command | at now +3 hours
$ atq
9     Mon Dec  5 14:00:00 2016 a nr
Run Code Online (Sandbox Code Playgroud)

但是过了 1 小时后我改变了主意,然后需要立即#9从队列中运行该特定作业a,即比计划运行的时间早 2 小时。

我该怎么做?

我知道我可以将作业命令打印到stdout,将其复制并粘贴到命令行,手动运行它,然后删除作业#9

$ at -c 9
command
$ command
$ atrm 9
Run Code Online (Sandbox Code Playgroud)

但这相当于运行另一个作业,而不是#9从 queue 运行a

小智 5

有两种可能:

  • 谢谢。请提供其他答案的链接好吗? (2认同)