你能在 crontab 上多行注释吗

bel*_*laz 35 linux cron

我可以使用 C++/Java 风格的/* */语法在 crontab 文件中添加多行注释吗?

小智 58

crontab 文件中允许的唯一注释字符是#. 所以你需要这样做:

# This is line 1
# This is line 2
0 0 * * * /usr/bin/magiccronjob
Run Code Online (Sandbox Code Playgroud)

编辑:我相信man 5 crontab可以查看有关 crontab 语法的详细信息。