

Code: Select all
create ~ # crontab -l
### create:/etc/crontab
#
# minute (0-59)
# / hour (0-23)
# / / day (1-31)
# / / / month (1-12)
# / / / / weekday (0-6,0=sun)
#/ / / / / command
# sync clock
5 12 * * * nice rdate -s ntp{0,3}.fau.de &>~/.log/cron.rdate
# sync portage update esearch db and fetch sources while lunch
12 12 * * * nice esync && nice emerge -fuD world &>~/.log/cron.portage
# update manpages/slocate database
0 4 * * * nice makewhatis && nice updatedb &>~/.log/cron.databasesCode: Select all
tv@create ~ $ crontab -l
### create:~tv/.crontab
# fetch tv listings every monday morning
0 2 * * 1 tv_grab_de_tvtoday|tv_sort >~/.tvtime/listings.xml
# fetchmail all 10 minutes
*/10 * * * * fetchmail -am /usr/bin/procmail &>~/.log/fetchmail
# update orca states every hour
5 * * * * /usr/local/bin/orca -o /home/http/orca/procallator.cfg &>~/.log/orca
# update etc html files every hour
0 * * * * ~/lib/indirect/cron.etc2html &>~/.log/etc2html
# vim: ft=crontab

Code: Select all
# /etc/crontab
#
# $Header: /var/cvsroot/gentoo-x86/sys-apps/fcron/files/crontab,v 1.7 2004/07/18 04:34:03 dragonheart Exp $
# fcron || dcron:
# This is NOT the system crontab! fcron and dcron do not support a system crontab.
# to get /etc/cron.{hourly|daily|weekly|montly} working with fcron or dcron do
# crontab /etc/crontab
# as root.
# NOTE: This will REPLACE root's current crontab!!
# 20 Apr 2002; Thilo Bangert <bangert@gentoo.org>
# check scripts in cron.hourly, cron.daily, cron.weekly and cron.monthly
0 * * * * rm -f /var/spool/cron/lastrun/cron.hourly
1 3 * * * rm -f /var/spool/cron/lastrun/cron.daily
15 4 * * 6 rm -f /var/spool/cron/lastrun/cron.weekly
30 5 1 * * rm -f /var/spool/cron/lastrun/cron.monthly
*/10 * * * * /usr/bin/test -x /usr/sbin/run-crons && /usr/sbin/run-crons
# update
0 */12 * * * chkrootkit -q
0 2 * * * nice makewhatis
15 2 * * * nice updatedb
30 2 * * * slocate -u
0 3 * * * emerge sync
30 4 * * * update # alias for emerge world --newuse -uD
# cleanup
25 3 * * * ccache -C
30 3 * * * rm -R /var/tmp
# backup /etc, /var, /boot, /root, and configs in /home/gagt
* 4 * * * tar czf /shared/backups/important/etc /etc && tar czf /shared/backups/important/var /var && tar czf /shared/backups/important/boot /boot && tar czf /shared/backups/important/root /root && cp /home/gagt/.xinitrc /shared/backups/important/ && cp /home/gagt/.bashrc /shared/backups/important/ && cp /home/gagt/.bash_history /shared/backups/important/ && cp -R /home/gagt/.icewm /shared/backups/important/
Code: Select all
10 * * * * rm -f /var/spool/cron/lastrun/cron.hourly
10 3 * * * rm -f /var/spool/cron/lastrun/cron.daily
40 3 * * 6 rm -f /var/spool/cron/lastrun/cron.weekly
10 4 1 * * rm -f /var/spool/cron/lastrun/cron.monthly
*/15 * * * * test -x /usr/sbin/run-crons && /usr/sbin/run-crons
5 3 * * 0 /root/utilities/cleanDist -d
5 3 * * * /root/utilities/emergeSync
5 5 * * 6 /root/utilities/sysGetup
5 5 * * 1,3,5 /root/utilities/userGetupCode: Select all
# ls -l /etc/cron.*
cron.daily:
total 8
-rwxr-xr-x 1 root root 588 Feb 11 16:54 chkrootkit
-rwxr-xr-x 1 root root 221 Feb 11 16:54 logrotate
cron.hourly:
total 0
cron.monthly:
total 0
cron.weekly:
total 8
-rwxr-xr-x 1 root root 394 Feb 11 16:55 cleanSpam
-rwxr-xr-x 1 root root 499 Feb 12 16:02 dbupdateCode: Select all
44 6 * * mon-fri beep -f 2000 -r 3
Code: Select all
0 0 * * * ntpdate l000
5 0 * * * nice -n -19 emerge-webrsync > /dev/null 2>&1
20 0 * * * nice -n -19 emerge -upv world > ~/docs/last_updates 2>&1
#22 0 * * * nice -n -19 emerge -u world > /dev/null 2>&1
#0 3 * * * nice -n -19 /usr/bin/run_queued_emerges
0 4 * * * /usr/sbin/tmpwatch 72 /tmp
0 4 * * * /usr/sbin/tmpwatch 72 /var/tmp
0 4 * * * mv ~/docs/chkrootkit ~/docs/chkrootkit.last
15 4 * * * /usr/sbin/chkrootkit > ~/docs/chkrootkit
30 4 * * * /usr/bin/diff ~/docs/chkrootkit.last ~/docs/chkrootkit > ~/docs/chkrootkit.diff.${DATE}
0 5 * * * rm ~/docs/chkrootkit.last
0 3 * * * nice -n -19 updatedb > /dev/null 2>&1


Code: Select all
#########Lets Create the Master Console and backup the last Masterconsole for 1 day#########
59 23 * * * mv /var/log/masterconsole /var/log/masterconsole.old
0 0 * * * touch /var/log/masterconsole
#########misc#########
0 12 * * * /usr/sbin/logrotate /etc/logrotate.conf
0 12 * * * /usr/bin/webalizer
#########Lets update the system and some programs#########
20 * * * * nice -n 19 /bin/yasuc
0 8 * * * /usr/sbin/makewhatis -u -v
30 8 * * * nice -n -5 /usr/sbin/fixpackages
0 9 * * * nice -n -5 /usr/bin/fc-cache -fv
0 10 * * * nice -n -5 /usr/sbin/prelink -afmR
0 11 * * * /usr/bin/slocate -u
15 11 * * * nice -n -5 /usr/sbin/eix-sync
1 12 * * * /usr/local/sbin/nessus-update-plugins
10 12 * * * /usr/bin/bdc --update
11 12 * * * /usr/bin/rkhunter --update
#########Lets Check for Viruses and Rootkits#########
15 12 * * * /usr/bin/bdc --all / >> /var/log/masterconsole
0 13 * * * /usr/bin/rkhunter -c --cronjob --dislpay-logfile >> /var/log/masterconsole
#########Now iam back from Work, gimme some Infos #########
15 * * * * nice -n 19 netstat -a >> /var/log/masterconsole
2 * * * * nice -n 19 w >> /var/log/masterconsole
0 18 * * * /usr/sbin/logwatch.pl
30 18 * * * nice -n 10 /usr/bin/emerge -unDpv world >> /var/log/masterconsole
0 19 * * * nice -n 19 /usr/bin/ccache -s >> /var/log/masterconsole
5 19 * * * nice -n 10/usr/bin/glsa-check -l | grep '\[N\]' >> /var/log/masterconsole