Tasques programades a linux debian.."Afegir un script a Cron"
Afegir un script a Cron (Comantes programades per tal que s'executin en un determinat instant de temps):
#crontab -e
* * * * * ./script.sh
Reiniciar servidor Cron a debian:
#/etc/init.d/cron start
Veure log cron:
#grep CRON /var/log/syslog
# * * * * * command to execute
# ┬ ┬ ┬ ┬ ┬
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ └───── day of week (0 - 7) (0 to 6 are Sunday to Saturday, or use names; 7 is Sunday, the same as 0)
# │ │ │ └────────── month (1 - 12)
# │ │ └─────────────── day of month (1 - 31)
# │ └──────────────────── hour (0 - 23)
# └───────────────────────── min (0 - 59)
#crontab -e
* * * * * ./script.sh
Reiniciar servidor Cron a debian:
#/etc/init.d/cron start
Veure log cron:
#grep CRON /var/log/syslog
# * * * * * command to execute
# ┬ ┬ ┬ ┬ ┬
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ └───── day of week (0 - 7) (0 to 6 are Sunday to Saturday, or use names; 7 is Sunday, the same as 0)
# │ │ │ └────────── month (1 - 12)
# │ │ └─────────────── day of month (1 - 31)
# │ └──────────────────── hour (0 - 23)
# └───────────────────────── min (0 - 59)
Un administrador del blog ha eliminat aquest comentari.
ResponElimina