Interessante isso dos nomes do arquivo.

Porém, estou cansado de usar arquivos com extensão .sh no cron e funciona. E
digo mais, sem linha em branco no final.

Eden Caldas
Consultor de TI
e...@linuxfacil.srv.br
(81) 9653 7220
LINUX FÁCIL – Consultoria e Serviços em TI


Em 14 de dezembro de 2010 15:18, Welington R. Braga
<welrbr...@gmail.com>escreveu:

> Em 14 de dezembro de 2010 15:41, Leonardo Carneiro
> <chesterma...@gmail.com> escreveu:
> > ...
> >
> >> 2 - Remova a a extensão do arquivo (.sh) neste caso. Oobserve que
> >> nenhum arquivo executado pelo cron possui extensão.
> >
> > Esta info não procede. O arquivo, sendo executável, irá executar,
> > independente de extensão. Apenas para diferenciar dos demais, eu uso a
> > extensão .cron nos meus scripts.
> >
> Leonardo,
>
> Segue parte do manual do cron (8) onde afirma exatamente isto que eu disse:
>
>       [...]Files must conform to the same naming convention as used  by
>  run-
>       parts(8):  they must consist solely of upper- and lower-case
> letters, digits, underscores, and hyphens. If the
>       -l option is specified, then they must conform to the LSB
> namespace specification, exactly as  in  the  --lsb-
>       sysinit option in run-parts.
>
>
> Agora veja o que o manual run-parts (8) afirma e porque ele foi citado:
>
>       If  the  --lsbsysinit  option  is not given then the names must
> consist
>       entirely of upper and lower  case  letters,  digits,  underscores,
>  and
>       hyphens.
>
>       If  the  --lsbsysinit  option  is given, then the names must not end
> in
>       .dpkg-old  or .dpkg-dist and must belong to one or more of the
>  follow-
>       ing  namespaces:  the  LANANA-assigned namespace (^[a-z0-9]+$); the
> LSB
>       hierarchical and  reserved  namespaces
>  (^_?([a-z0-9_.]+-)+[a-z0-9]+$);
>       and the Debian cron script namespace (^[a-z0-9][a-z0-9-]*$).
>
>
> Perceba então que para o run-parts e/ou cron aceitar nomes com "." a
> opção -l (no cron) ou a apção --lsbsysinit (no run-parts) deverá ser
> informada explicitamente, o que deverá ser feito em /etc/default/cron
>
>
> --
> Welington Rodrigues Braga
> --------------
> Web: http://www.welrbraga.eti.br
> MSN: welrbraga[*]msn·com
> Gtalk: welrbraga[*]gmail·com
> Yahoo / Skype:  welrbraga
> PGP Key: 0x6C7654EB
> Linux User #253605
>
> "Em tudo somos atribulados, porém não angustiados; perplexos, porém
> não desanimados; perseguidos, porém não desamparados; abatidos, porém
> não destruídos;" - 2Co 4:8,9
>
>
> --
> To UNSUBSCRIBE, email to debian-user-portuguese-requ...@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact
> listmas...@lists.debian.org
> Archive:
> http://lists.debian.org/aanlktitjmwsftdyog8c-hwe+hsa-g_nrl7jm8psx...@mail.gmail.com
>
>

Responder a