Comment Out or Disable a Cron Job
To disable a cron entry without deleting it, put a hash (#) at the very start of the line; cron skips any line beginning with #. Comments must be on their own line — you cannot add a trailing comment after the command, because cron treats everything after the fifth field as part of the command.
Disable a job
Prefix the whole line with #:
# 0 3 * * * /usr/local/bin/backup.sh
The job is kept for reference but never runs. Remove the # to re-enable it.
Add a note
Put explanatory comments on their own lines above the job:
# Nightly database backup, keeps 7 days
0 3 * * * /usr/local/bin/backup.sh
What does not work
A trailing comment on the schedule line breaks the job:
0 3 * * * /usr/local/bin/backup.sh # nightly ← the # and text become arguments
Cron does not strip end-of-line comments, so keep notes on separate # lines.
FAQ
How do I temporarily disable a cron job?
Put a # at the very start of its line and save. Cron ignores commented lines, so the job is kept but never runs. Delete the # to re-enable it.
Can I add a comment at the end of a cron line?
No. Cron treats everything after the fifth time field as the command, so a trailing # becomes an argument. Put comments on their own line above the job.
Does commenting a job delete it?
No. The line stays in your crontab for reference; it just does not execute while the # is present.