How Do I Comment Crontab Entries in Unix?
Contents

Can you put comments in crontab?

Note that comments are not allowed on the same line as cron commands, since they are considered a part of the command. Similarly, comments are not allowed on the same line as environment variable settings.

How do you comment and uncomment a cron job in UNIX?

Run “vi /etc/crontab“, arrow down to each line you wish uncommented and press “x” to delete the #. If you make a mistake, press “u” to undo it. When done, type “:wq” to exit vi.

Alexander Ross

Alexander Ross

Gaming, Esports & Interactive Media Writer

Alexander Ross has covered the video game industry for a decade, writing deep dives on game design, esports tournaments, VR developments, and gaming culture.

Share this article
Twitter Facebook Pinterest