On Sun, 9 Jan 2000, Kathy Hargreaves wrote:

> Does anyone know if this crontab setup would be a race condition?
> 
>     0 0 * * 7 /l/httpd/scripts/archive-logs --weekly
>     0 0 1 * * /l/httpd/scripts/archive-logs --monthly
>     0 0 1 1 * /l/httpd/scripts/archive-logs --yearly
>             
> On the days when two or more date conditions are met, I want the script
> to run first with the ``weekly'' option, then with the ``monthly'' one,
> then with the ``yearly'' one.  And I don't want to stagger the hours
> because for each condition, I need to archive the logs right on that
> boundary.

I think it would depend on th eprogram you issue (whether this handles
concurrent invocations gracefully). The docs that came with cron revealed
nothing intersting about that issue. Maybe you should write a wrapper for
the program that gets run every day, checking whether it's Sunday (and
issuing the weekly one), the first of a month (... monthly) or Jan 1st
(yearly).

That should be an easy one.

Nils
-- 
 Nils Philippsen / Berliner Straße 39 / D-71229 Leonberg // +49.7152.209647
[EMAIL PROTECTED] / [EMAIL PROTECTED] / [EMAIL PROTECTED]
   The use of COBOL cripples the mind; its teaching should, therefore, be
   regarded as a criminal offence.                  -- Edsger W. Dijkstra


************
[EMAIL PROTECTED]   http://www.linuxchix.org

Reply via email to