Visualizzazione dei risultati da 1 a 3 su 3
  1. #1
    Utente di HTML.it
    Registrato dal
    Jul 2004
    Messaggi
    147

    cron non lancia lo script

    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?

  2. #2
    Utente di HTML.it
    Registrato dal
    Jul 2004
    Messaggi
    147
    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?

  3. #3
    Utente di HTML.it
    Registrato dal
    Jul 2004
    Messaggi
    147
    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ì

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.