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

Re: cron jobs more often than daily



On 14-Jan-1998 12:06:36, Hamish Moffatt <hamish@debian.org> wrote:
> On Wed, Jan 14, 1998 at 12:02:56PM +1100, Hamish Moffatt wrote:
> >
> > Are the /etc/cron.d files in standard crontab format, ie one
> > line per job? 

Yes. Basically, just take the lines that you would like to put into
/etc/crontab, and put them in a file in /etc/cron.d. Note that the lines
are in the '* * * * * user cmd' format, not '* * * * * cmd'.

> > Given that these files need to be conffiles (as mentioned in Christian's
> > proposed amendments) this means that the job needs to test that the
> > package hasn't been removed (but not purged), ie that the executables
> > it needs still exists. 

Ick. Hadn't thought of that.

[Hammish wrote both of these:]
> > This could be difficult to fit on one line,
> > which means then that a script would have to be provided in a different
> > location. Something like /usr/bin/packagename-cronjob or similar.
> > Can anyone see a better alternative?
> 
> But then the /etc/cron.d crontab needs to check that that script
> exists (since it doesn't need to be a conffile) and we're back where
> we started, now that I think about it.

Ah, but why *can't* packagename-cronjob be a conffile? I agree that's it's
a perversion of the meaning of 'conffile', but it certainly solves the
problem -- it won't be removed until a purge.

Alternatively, here's the one liner that works for any package:

dpkg --status <package> | grep 'Status:.*ok installed' && <whatever>

but that has the disadvantage of being a fairly big hit. Depending on
how frequently the job is scheduled and how intensive <whatever> is, it
may or may not be acceptable.

Steve

-- 
Steve Greenland


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: