Packages may not touch the configuration file /etc/crontab, nor may they modify the files in /var/spool/cron/crontabs.
If a package wants to install a job that has to be executed via cron, it shall place a file with the name of the package in one of the following directories:
/etc/cron.daily /etc/cron.weekly /etc/cron.monthly
As these directory names say, the files within them are executed on a daily, weekly, or monthly basis, respectively.
If a certain job has to be executed more frequently than daily, the package shall install a file /etc/cron.d/package-name tagged as configuration file. This file uses the same syntax as /etc/crontab and is processed by cron automatically.
It is recommended that files installed in any of these directories be scripts (shell scripts, Perl scripts, etc.) so that they may be modified by the local system administrator. In addition, they must be registered as configuration file.
The scripts in these directories have to check, if all necessary programs are installed before they try to execute them. Otherwise, problems will arise when a package was removed (but not purged), since the configuration files are kept on the system in this situation.
To avoid namespace conflicts in the /etc/cron.* directories, the filenames used by LSB-compliant packages in /etc/cron.daily, /etc/cron.weekly, /etc/cron.monthly, or /etc/cron.d must come from a managed namespace. These filenames may be assigned using one of the following methods:
Assigned namespace. This namespace consists of names which only use the character set [a-z0-9]. In order to avoid conflicts these cron script names must be reserved through the Linux Assigned Names and Numbers Authority (LANANA). Information about the LANANA may be found at www.lanana.org.
Commonly used names shall be reserved in advance; developers for projects should be encouraged reserve names from LANA, so that each distribution can use the same name, and to avoid conflicts with other projects.
Hierarchical namespace. This namespace consists of scripts names which look like this: [hier1]-[hier2]-...-[name], where name is again taken the character set [a-z0-9], and where there may be one or more [hier-n] components. [hier1] may either be an LSB provider name assigned by the LANANA, or it may be owners' DNS name in lower case, with at least one '.'. I.e., "debian.org", "staroffice.sun.com", etc. The LSB provider name assigned by LANANA must only consist of the ASCII characters [a-z0-9].
Reserved namespace. This namespace consists of script names which begin with the character '_', and is reserved for distribution use only. This namespace should be used for core packages only, and in general use of this namespace is highly discouraged.