Wie lege ich Cron-Jobs an?
Tuto: cron-jobs
Crontab liegt bei RedHat-basierten Systemen (Red Hat, Fedora, CentoS) unter /etc.
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
TMPDIR=/home/.tmp
HOME=/
# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
04,34 * * * * root run-parts /etc/cron.half-hourly
03,18,33,48 * * * * root run-parts /etc/cron.quarter-hourly
05 0,6,12,18 * * * root run-parts /etc/cron.quarter-daily
* * * * * root /etc/test.sh
Jede Minute wird das Skript /etc/test.sh mit root-Rechten ausgeführt.
Wie wird die Betriebssystem-Version abgefragt?
uname -rsvo
z.B.
uname -orvs
Linux 2.6.9-023stab048.6 #1 Thu Aug 27 02:00:26 CEST 2009 GNU/Linux

