延迟在shell脚本中运行命令

use*_*319 0 unix shell command timedelay

我编写了一个shell脚本,其中包含一些用于收集各种测试日志的命令.但是我想在特定命令之前放置等待时间,以便在启动shell脚本后30分钟后运行.任何有相关知识的人请帮助我出.

提前致谢

Joh*_*n C 8

您可以使用该at命令安排作业随时运行:

echo "/my_path/my_script" | at now + 30 minutes
Run Code Online (Sandbox Code Playgroud)

如果您希望在脚本内部延迟,可以使用解决方案睡眠到特定时间.