Re: [DRAFT #2] Cron jobs
On Tue, Mar 16, 1999 at 01:36:02PM -0800, Daniel Quinlan wrote:
> 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.)
applications, but non-LSB applications may make use of 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
As the directory names suggest, 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>).
For consistency's sake, we could mandate /etc/cron.d/hourly as well,
leaving /etc/cron.d for distribution-specific cron jobs. Perhaps,
while we're at it, standarddize on distro-specific stuff in /etc/cron.d,
leaving us with something that looks like
1. FHS/LSB standards in /etc/<period>
2. Distribution specific cron jobs in /etc/cron.d
3. Everything else in /var/spool/cron/crontabs
> 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.
configuration files.
> The scripts in these directories have to check, if all necessary
> programs are installed before they try to execute them. Otherwise,
The scripts in these directories must verify that all necessary
programs are installed before attempting 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 ----------------------------
Kurt
--
Drink your coffee! There are people sleeping in India!
Reply to: