cron.d Directory

Designed to allow packages to install crontab snippets without having to modify /etc/crontab

In Debian derivatives, including Lubuntu, the files in /etc/cron.d are effectively /etc/crontab snippets, with the same format.

The cron.d directory is designed to allow packages to install crontab snippets without having to modify /etc/crontab

Quoting the cron manpage:

Additionally, in Debian, cron reads the files in the /etc/cron.d directory. cron treats the files in /etc/cron.d as in the same way as the /etc/crontab file (they follow the special format of that file, i.e. they include the user field). However, they are independent of /etc/crontab: they do not, for example, inherit environment variable settings from it. This change is specific to Debian see the note under DEBIAN SPECIFIC below.

Like /etc/crontab, the files in the /etc/cron.d directory are monitored for changes. In general, the system administrator should not use /etc/cron.d/, but use the standard system crontab /etc/crontab.

The Debian-specific section hints at the reason system administrators shouldn’t use /etc/cron.d:

Support for /etc/cron.d (drop-in dir for package crontabs)

.

Last updated