Re: votre avis sur un crontab

Top Page

Reply to this message
Author: Habib Bouaziz-Viallet
Date:  
To: guilde
Subject: Re: votre avis sur un crontab
Le 27/11/07, Edgar Bonet <guilde@???> a écrit :
>
> Le mardi 27 novembre, Habib Bouaziz-Viallet a écrit :
> > Counterintuitively, if both "day of month" (field 3) and "day of week"
> > (field 5) are present (i.e., not "*") on the same line, then the command
> is
> > executed when *either* is true.
> > Ce qui signifie en clair qu'il faut qu'une des deux propositions (en col
> 3
> > ou 5) soit vraie pour éxecuter la commande. Ce qui est très gênant ...!
>
> J'essayerais un truc comme ça :
>
> 0 2 1-7 10 * [ `date +%u` == 7 ] && mon_script_shell >>
> /var/log/sntpdate/messages



Je veux bien, mais que signifie [ `date +%u` == 7 ]

Edgar.
>
> Habib.


--
M. Bouaziz-Viallet