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

Re: cron jobs more often than daily



Steve Greenland <steveg@rpcweb.dmccorp.com> writes:

> I agree that there seems to be a need for general solution. There are
> two general approaches:

This might be completely off base, but what about a (hopefully small)
hack to cron for debian systems that makes it concatenate
/etc/cron.debian/* with /etc/crontab everytime it would have just
loaded /etc/crontab.  Then packages would just have to put crontab
snippets into /etc/crontab.debian/.  If stat-ing all these files is
too much work for cron every minute, then just have update-crontab
concatenate them into one file, say /etc/crontab.debian/cron.  Then
there are only two files to stat.

Something like

  if [ -x /usr/bin/update-crontab ] ; then update-crontab ; fi

would be used in each package's postinst to make sure things are OK if
cron's not installed.

An alternate idea, which I thought of first, but probably won't work,
was to create a user called debcron or something, then have files like
menu's /usr/lib/menu files which are used to build debcron's crontab.
The problem with that would be that I can't see any easy way to make
the tasks run as the appropriate user.

This latter approach is just another case of the more general
mechanism that Guy outlined eariler.

-- 
Rob Browning <rlb@cs.utexas.edu>
PGP fingerprint = E8 0E 0D 04 F5 21 A0 94  53 2B 97 F5 D6 4E 39 30


--
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: