[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[DRAFT #2] Cron jobs



Minor changes based on the mailing list discussion.

------- start of proposal --------------
Cron jobs

This is a specification proposal for LSB-compliant package cron jobs.
(It is not meant to apply to cron jobs outside the scope of LSB
applications, but non-LSB applications may make use of the this API.)

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 if 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.  The files within these
directories shall be executable, and compliant with the whole of the
LSB specification.

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.  The executables associated
with files in /etc/cron.d/<package-name> shall be placed in LSB
compliant directories (generally, /opt/<package-name>).

All files installed in any of these directories have to be shell
scripts so that they can easily be modified by the local system
administrator. In addition, they have to 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.
------- end ----------------------------


Reply to: