是否可以在一行上指定 at 命令?

jco*_*lum 3 command-line at

我想在接下来的 12 小时内安排 8 个curl 命令。我想知道是否有办法处理 8 个单行调用 at. 有点像:

$  at now + 1 min "curl -X POST 'http://localhost:5566/export/778'" 
Run Code Online (Sandbox Code Playgroud)

或者

$ at now + 1 min -- curl -X POST 'http://localhost:5566/export/778'
Run Code Online (Sandbox Code Playgroud)

但这些都不起作用。我在手册页中没有看到任何关于此的内容。

除此之外,有没有办法在at子 shell 内设置下一个命令的时间?

jll*_*gre 6

一种便携的方式是:

$ echo "curl -X POST 'http://localhost:5566/export/778'" | at now + 1 min  
Run Code Online (Sandbox Code Playgroud)


Spa*_*sle 5

您应该在这里使用字符串:

$ at now + 1 min <<<"curl -X POST 'http://localhost:5566/export/778'" 
Run Code Online (Sandbox Code Playgroud)