Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我最近在命令行上遇到了 at 命令,但我想知道是否可以编写一个 bash 脚本,以某种方式让我能够告诉 at 命令在每天晚上 8 点运行,或者每周一、每周等基本上在定期间隔。这怎么可能?
at是这项工作的错误工具。
at
你正在寻找cron.
cron
每天晚上 8 点将是:
0 20 * * * /bin/execute/this/script.sh
每个星期一晚上 8 点将是:
0 20 * * 1 /bin/execute/this/script.sh