douglaspires83
(usa Debian)
Enviado em 08/06/2010 - 11:13h
este é o meu arquivo /etc/crontab
=========================================================================================
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# m h dom mon dow user command
17 * * * * root cd / && run-parts --report /etc/cron.hourly
#30 4 * * * root /usr/bin/CodBackup
30 4 * * * root /etc/init.d/BackupServer
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
#
=========================================================================================
e agora consegui ativar os logs do cron, que por padrao nao vem ativo no Ubuntu
olha o /var/log/cron.log depois que ele executou agendado pelo cron
=========================================================================================
root@real:/usr/sbin# nano /var/log/cron.log
GNU nano 2.0.7 File: /var/log/cron.log
Jun 8 11:02:56 real /usr/sbin/cron[8257]: (CRON) INFO (pidfile fd = 3)
Jun 8 11:02:56 real /usr/sbin/cron[8258]: (CRON) STARTUP (fork ok)
Jun 8 11:02:56 real /usr/sbin/cron[8258]: (CRON) INFO (Skipping @reboot jobs -- not system startup)
Jun 8 11:04:01 real /USR/SBIN/CRON[8345]: (root) CMD ( /etc/init.d/BackupServer)
Jun 8 11:05:01 real /USR/SBIN/CRON[8423]: (root) CMD (/usr/share/ebox-usersandgroups/slave-sync)