Bom, olhei outros tópicos antes de postar.
Então, meu script ta executável e dentro da pasta sbin; script bem simplesCódigo :SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root HOME=/ # For details see man 4 crontabs # Example of job definition: # .---------------- minute (0 - 59) # | .------------- hour (0 - 23) # | | .---------- day of month (1 - 31) # | | | .------- month (1 - 12) OR jan,feb,mar,apr ... # | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat # | | | | | # * * * * * command to be executed 30 23 * * * sarg.sh
Sera que esta tudo certo? não estou afim de gerar um relatório agora.Código :#!/bin/bash sarg -f /etc/sarg/sarg.conf exit 0
Abraço.
EDIT:
Tentei um teste:
[root@server ~]# /etc/rc.d/init.d/dhcpd status
dhcpd (pid 1974) está em execução...
#Adicionei a linha
00 11 * * * /etc/rc.d/init.d/dhcpd stop
#Reiniciei o serviço
/etc/rc.d/init.d/crond restart
#Esperei, e não deu certo.
[root@server ~]# /etc/rc.d/init.d/dhcpd status
dhcpd (pid 1974) está em execução...
EDIT:
Só adicionar root que funcionou
00 11 * * * root /etc/rc.d/init.d/dhcpd stop
Pode fechar, deletar...
Abraços.