cron 作业的最大长度

Tro*_*ner 7 ssh cron curl

我想每分钟执行一个命令(SSH)。该命令是一个 cURL bash,长度是 1625。当我将命令放入 crontabs 并保存时:

    "/tmp/crontab.ijKPl1/crontab":51: command too long
errors in crontab file, can't install.
Do you want to retry the same edit? (y/n)
Run Code Online (Sandbox Code Playgroud)

Gab*_*Lee 8

serverfault 上有人回答了类似的问题 - Crontab 最大命令长度

999 个字符。

只需创建一个 bash 脚本并运行它,而不是在 crontab 中包含整个命令。