PDA

Visualizza la versione completa : cron non lancia lo script


Ali79
13-02-2005, 18:05
ho un piccolo script che vorrei far partire con cron
lo scrip funziona perché le lo lancio direttamente io fa quello che deve fare

nel mio file /var/spool/cron/crontabs/root c'è questo

# Run the hourly, daily, weekly, and monthly cron jobs.
# Jobs that need different timing may be entered into the crontab as before,
# but most really don't need greater granularity than this. If the exact
# times of the hourly, daily, weekly, and monthly cron jobs do not suit your
# needs, feel free to adjust them.
#
# Run hourly cron jobs at 47 minutes after the hour:
47 * * * * /usr/bin/run-parts /etc/cron.hourly 1> /dev/null
#
# Run daily cron jobs at 4:40 every day:
40 4 * * * /usr/bin/run-parts /etc/cron.daily 1> /dev/null
#
# Run weekly cron jobs at 4:30 on the first day of the week:
30 4 * * 0 /usr/bin/run-parts /etc/cron.weekly 1> /dev/null
#
# Run monthly cron jobs at 4:20 on the first day of the month:
20 4 1 * * /usr/bin/run-parts /etc/cron.monthly 1> /dev/null
#
#backup ogni giorno alle 15:30
0 17 * * * /bin/backup

ma non funziona!?!?
se do da root:
ps aux | grep cron

root 3258 0.0 0.2 1592 628 ? S 11:49 0:00 /usr/sbin/crond -l10
root 17651 0.0 0.3 1892 780 pts/5 R+ 17:07 0:00 grep cron


che devo fare?

Ali79
13-02-2005, 18:31
e se do il comando crontab -l

# Run the hourly, daily, weekly, and monthly cron jobs.
# Jobs that need different timing may be entered into the crontab as before,
# but most really don't need greater granularity than this. If the exact
# times of the hourly, daily, weekly, and monthly cron jobs do not suit your
# needs, feel free to adjust them.
#
# Run hourly cron jobs at 47 minutes after the hour:
47 * * * * /usr/bin/run-parts /etc/cron.hourly 1> /dev/null
#
# Run daily cron jobs at 4:40 every day:
40 4 * * * /usr/bin/run-parts /etc/cron.daily 1> /dev/null
#
# Run weekly cron jobs at 4:30 on the first day of the week:
30 4 * * 0 /usr/bin/run-parts /etc/cron.weekly 1> /dev/null
#
# Run monthly cron jobs at 4:20 on the first day of the month:
20 4 1 * * /usr/bin/run-parts /etc/cron.monthly 1> /dev/null
#
#backup ogni giorno alle 15:30
30 17 * * * /bin/backup
#

a proposito /dev/null che cosa significa?

Ali79
13-02-2005, 19:31
ora funziona
ho eliminato il file root già presente nella cartella
/var/spool/cron/crontabs/
e ne ho creato uno nuovo

spero di non aver fatto danni così

Loading