Re: Re: Cron jeden ersten Mittwoch im Monat ausführ

From: Oliver Fromme <oliver(at)fromme.com>
Date: Thu, 25 Aug 2016 09:59:37 +0200 (CEST)

Frank wrote:
> folgendes sollte auch funktionieren.
>
> 3 3 1-7 * 3 root cd /usr/local/etc/geo && ./updategeo.sh

Nein ... Wenn's so einfach wäre, könnte man sich die Krücke
mit der zusätzlichen date-Abfrage sparen. In obigem Fall
würde das Kommando an den ersten sieben Tagen jeden Monats
_und_ an jedem Mittwoch ausgeführt werden.

Aus der Manpage crontab(5):
"Note: The day of a command's execution can be specified by two
fields — day of month, and day of week. If both fields are
restricted (ie, are not *), the command will be run when either
field matches the current time. For example, ``30 4 1,15 * 5''
would cause a command to be run at 4:30 am on the 1st and 15th
of each month, plus every Friday."

Gruß
   Olli

-- 
Oliver Fromme, München   --   FreeBSD + DragonFly BSD
``We are all but compressed light'' - Albert Einstein
To Unsubscribe: send mail to majordomo(at)de.FreeBSD.org
with "unsubscribe de-bsd-questions" in the body of the message
Received on Thu 25 Aug 2016 - 09:59:45 CEST

search this site