first comment line in crontab always gets removed

Matthew Dillon dillon at
Mon May 3 09:28:22 PDT 2010

:I commented out my first line in crontab and saved it.
:When I took 'crontab -e' I found that it was removed.
:I tested it again. same behavior
:The first line ony gets removed if it starts with a #
:Is this accepted behavior?

    It's inherited from the original cron edit code where it tries to
    remove # template comments that it added to the original file.
    It should probably just not touch the content at all.  I've been
    hit by this issue too where I comment out a crontab line that
    happens to be at the top and cron deletes the commented line entirely.

					Matthew Dillon 
					<dillon at>

More information about the Users mailing list