Hallo,
meint ihr, ihr könntet einem Linux-Anfänger erklären wie er einen Cronjob einrichtet ? Ich hab schon einiges probiert - komme aber auf keinen grünen Zweig.
Im Verzeichnis etc/ gibt's die Unterverzeichnisse cron.daily, ..hourly, ..monthly, ..weekly. In cron.daily habe ich die Datei "daily" (soll eine Datenbank sichern) gespeichert und ausführbar gemacht.
Manuelles starten mit ./daily klappt.
Ich weiß aber nicht, in welche crontab ich was schreiben soll. Es gibt eine für's System (etc/crontab) und eine für root (var/spool/cron/tabs/root)
In der Letzten steht z.B.:
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/usr/local/psa/tmp/crontabMqwm1e installed on Fri Mar 23 17:24:11 2007)
# (Cron version V5.0 -- $Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie Exp $)
*/15 * * * * /usr/local/psa/admin/sbin/backupmng >/dev/null 2>&1
27 3 * * * /usr/local/psa/bin/run-parts.sh /etc/psa/plesk-cron.daily
36 2 * * 7 /usr/local/psa/bin/run-parts.sh /etc/psa/plesk-cron.weekly
6 4 1 * * /usr/local/psa/bin/run-parts.sh /etc/psa/plesk-cron.monthly
0 1 * * 1 /usr/local/psa/libexec/modules/watchdog/cp/secur-check
0 1 * * 1 /usr/local/psa/libexec/modules/watchdog/cp/send-report weekly
10 1 * * * /usr/local/psa/libexec/modules/watchdog/cp/clean-sysstats
15 1 * * * /usr/local/psa/libexec/modules/watchdog/cp/pack-sysstats day
15 1 * * 1 /usr/local/psa/libexec/modules/watchdog/cp/pack-sysstats week
15 1 1 * * /usr/local/psa/libexec/modules/watchdog/cp/pack-sysstats month
15 1 1 * * /usr/local/psa/libexec/modules/watchdog/cp/pack-sysstats year
20 1 * * * /usr/local/psa/libexec/modules/watchdog/cp/clean-events
0 3 * * 7 /usr/local/psa/libexec/modules/watchdog/cp/clean-reports
--------
Also NICHT editieren. Wo muss das Script hin und in welche crontab muss ich's schreiben ?
Muss der Eintrag so aussehen:
"30 5 * * * etc/cron.daily/daily"
Roland
meint ihr, ihr könntet einem Linux-Anfänger erklären wie er einen Cronjob einrichtet ? Ich hab schon einiges probiert - komme aber auf keinen grünen Zweig.
Im Verzeichnis etc/ gibt's die Unterverzeichnisse cron.daily, ..hourly, ..monthly, ..weekly. In cron.daily habe ich die Datei "daily" (soll eine Datenbank sichern) gespeichert und ausführbar gemacht.
Manuelles starten mit ./daily klappt.
Ich weiß aber nicht, in welche crontab ich was schreiben soll. Es gibt eine für's System (etc/crontab) und eine für root (var/spool/cron/tabs/root)
In der Letzten steht z.B.:
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/usr/local/psa/tmp/crontabMqwm1e installed on Fri Mar 23 17:24:11 2007)
# (Cron version V5.0 -- $Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie Exp $)
*/15 * * * * /usr/local/psa/admin/sbin/backupmng >/dev/null 2>&1
27 3 * * * /usr/local/psa/bin/run-parts.sh /etc/psa/plesk-cron.daily
36 2 * * 7 /usr/local/psa/bin/run-parts.sh /etc/psa/plesk-cron.weekly
6 4 1 * * /usr/local/psa/bin/run-parts.sh /etc/psa/plesk-cron.monthly
0 1 * * 1 /usr/local/psa/libexec/modules/watchdog/cp/secur-check
0 1 * * 1 /usr/local/psa/libexec/modules/watchdog/cp/send-report weekly
10 1 * * * /usr/local/psa/libexec/modules/watchdog/cp/clean-sysstats
15 1 * * * /usr/local/psa/libexec/modules/watchdog/cp/pack-sysstats day
15 1 * * 1 /usr/local/psa/libexec/modules/watchdog/cp/pack-sysstats week
15 1 1 * * /usr/local/psa/libexec/modules/watchdog/cp/pack-sysstats month
15 1 1 * * /usr/local/psa/libexec/modules/watchdog/cp/pack-sysstats year
20 1 * * * /usr/local/psa/libexec/modules/watchdog/cp/clean-events
0 3 * * 7 /usr/local/psa/libexec/modules/watchdog/cp/clean-reports
--------
Also NICHT editieren. Wo muss das Script hin und in welche crontab muss ich's schreiben ?
Muss der Eintrag so aussehen:
"30 5 * * * etc/cron.daily/daily"
Roland