How to correctly edit /etc/cron.d/* files?
When I used
-
crontab -l
and crontab -e
I re-scheduled my cron timings, but found they were still firing at the previous interval.
I then discovered cron-format files under /etc/cron.d/
which contain the previous scheduling, and I now assume it is these files which cron
is obeying.
So I want to edit these, and remove the redundant "masking" lines from the main crontab, but the usage for crontab
is:
usage: crontab [-u user] file
crontab [-u user] { -e | -l | -r }
So using -l
or -e
seems mutually exclusive with specifying the file.
What is the correct way to edit files /etc/cron.d/*
?
Solution 1:
You can just use the editor of your choice to modify the cron.d files.
There's no need to use the crontab
command.