The differences are documented in detail in the cron(8)
manpage in Debian. The main difference is that /etc/cron.d
is populated with separate files, whereas crontab
manages one file per user; it’s thus easier to manage the contents of /etc/cron.d
using scripts (for automated installation and updates), and easier to manage crontab
using an editor (for end users really).
Other important differences are that not all distributions support /etc/cron.d
, and that the files in /etc/cron.d
have to meet a certain number of requirements (beyond being valid cron jobs): they must be owned by root, and must conform to run-parts
’ naming conventions (no dots, only letters, digits, underscores, and hyphens).
If you’re considering using /etc/cron.d
, it’s usually worth considering one of /etc/cron.hourly
, /etc/cron.daily
, /etc/cron.weekly
, or /etc/cron.monthly
instead.
crontab
.