Can I use the C++/Java-style /* */
syntax to multi-line comments in the crontab file?
Asked
Active
Viewed 6.1k times
1 Answers
68
The only comment character allowed in a crontab file is #
. So you need to do:
# This is line 1
# This is line 2
0 0 * * * /usr/bin/magiccronjob
Edit: I believe it's man 5 crontab to see the details about crontab syntax.
-
1"Blank lines and leading spaces and tabs are ignored. Lines whose first non-space character is a pound-sign (#) are comments, and are ignored. Note that comments are not allowed on the same line as cron commands, since they will be taken to be part of the command. Similarly, comments are not allowed on the same line as environment variable settings." – enharmonic Jan 30 '20 at 17:39
-
https://unix.stackexchange.com/q/749963 – buhtz Jun 27 '23 at 07:37