Adott egy ubuntu 9.10 rendszer, amit szervernek használok, de valójában a gépre egy desktop edition van telepítve, mivel néha asztali használat is van.
van egy savepage.sh file a /var/www/ mappában
ennek kéne 5 percenként lefutnia.
a crontab -l parancs ezt dobja ki:
# m h dom mon dow command
0,5,10,15,20,25,30,35,40,45,50,55 * * * * /var/www/bash savepage.sh
a cat /etc/crontab ezt adja:
# /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/bash
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
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 )
#
0,5,10,15,20,25,30,35,40,45,50,55 * * * * root bash /var/www/savepage.sh
Ennek ellenére mégsem fut le a script egyetlen egyszer sem automatikusan.
manuálisan kiadva a bash /var/www/savepage.sh -t tökéletesen működik.
Mit kéne vltoztatnom, vagy átírnom?