Bom dia Em 29 de setembro de 2011 10:04, Anderson Bertling < [email protected]> escreveu:
> Bom bia! > A duvida é básica mas não acho a resposta, estou criando um shellscript > para otimizar a instalação de um servidor, minha duvida é como posso inserir > via o shellscript um comando a cada 5 min no cron ? > man 5 crontab Step values can be used in conjunction with ranges. Following a range with ``/<number>'' specifies skips of the number's value through the range. For example, ``0-23/2'' can be used in the hours field to specify command execution every other hour (the alternative in the V7 standard is ``0,2,4,6,8,10,12,14,16,18,20,22''). Steps are also permitted after an asterisk, so if you want to say aqui a resposta: ``every two hours'', just use ``*/2''. no seu caso */5 e sim vc deve colocar seu script para rodar usando o cron, ou seja: a) insira no arquivo /etc/crontab a linha do cron para seu script */5 * * * * root /usr/local/bin/seuscript b) coloque no /etc/cron.d uma linha chamando seu script como: */5 * * * * root /usr/local/bin/seuscript e obviamente seixe seu script executavel c) usando o crontab -e chame o seu script ( arghhhhh!!!!!) bem 3 maneiras está bom para vc? []s PS ganhe 5 minutos e leia o man 5 cron...80) > > -- > Att > > Anderson Bertling > >

