cron Jobs on the OLD LBC Control Computer


[root@CMU etc]# ll cron*
-rw-r--r--    1 root     root          486 Nov 30  2012 crontab

cron.d:
total 0

cron.daily:
total 40
lrwxrwxrwx    1 root     root           28 Aug  5  2003 00-logwatch -> ../log.d/scripts/logwatch.pl
-rwxr-xr-x    1 root     root          135 Jan 26  2003 00webalizer
-rwxr-xr-x    1 root     root          276 Jan 24  2003 0anacron
-rwxr-xr-x    1 root     root          169 Feb 13 20:39 checkDisk
-rwxr-xr-x    1 root     root           51 Jan 24  2003 logrotate
-rwxr-xr-x    1 root     root          418 Feb 10  2003 makewhatis.cron
-rwxr-xr-x    1 root     root          100 Oct 15  2011 reset_winbindd
-rwxr-xr-x    1 root     root          104 Feb 27  2003 rpm
-rwxr-xr-x    1 root     root          132 Feb 19  2003 slocate.cron
-rwxr-xr-x    1 root     root          100 Feb 19  2003 tetex.cron
-rwxr-xr-x    1 root     root          193 Feb 10  2003 tmpwatch

cron.hourly:
total 0

cron.monthly:
total 4
-rwxr-xr-x    1 root     root          278 Jan 24  2003 0anacron

cron.weekly:
total 8
-rwxr-xr-x    1 root     root          277 Jan 24  2003 0anacron
-rwxr-xr-x    1 root     root          414 Feb 10  2003 makewhatis.cron


[root@CMU etc]# more crontab
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 17 * * * root run-parts /etc/cron.daily
22 17 * * 0 root run-parts /etc/cron.weekly
42 17 1 * * root run-parts /etc/cron.monthly
#0 15 * * * root /root/mauroplot > /dev/nul
#*/1 * * * * root php /home/lbccontrol/www/cacti/poller.php >>/var/log/poller.log 2>&1
# 0 15 * * 1-5 root zip -9rp "/root/backup/backup_`eval date +\%Y\%m\%d`.zip" /home/lbccontrol/*



[root@CMU cron.daily]# more 00webalizer 
#! /bin/bash
# update access statistics for the web site

if [ -s /var/log/httpd/access_log ] ; then
    /usr/bin/webalizer
fi[root@CMU cron.daily]# more 0anacron 
#!/bin/sh
#
# anacron's cron script
#
# This script updates anacron time stamps. It is called through run-parts
# either by anacron itself or by cron.
#
# The script is called "0anacron" to assure that it will be executed
# _before_ all other scripts.

anacron -u cron.daily

exit 0



[root@CMU cron.daily]# more checkDisk 
#!/bin/sh


space=$(df /home/lbccontrol | awk 'FNR == 2 {print $5}')
echo "/home/lbccontrol is   $space full" | mail -s "lbccontrol disk $space full" ksummers@lbto.org




[root@CMU cron.daily]# more logrotate 
#!/bin/sh
[root@CMU cron.daily]# more makewhatis.cron 
#!/bin/bash

LOCKFILE=/var/lock/makewhatis.lock

# the lockfile is not meant to be perfect, it's just in case the
# two makewhatis cron scripts get run close to each other to keep
# them from stepping on each other's toes.  The worst that will
# happen is that they will temporarily corrupt the database...
[ -f $LOCKFILE ] && exit 0
trap "{ rm -f $LOCKFILE ; exit 255; }" EXIT
touch $LOCKFILE
makewhatis -u -w
exit 0



#!/bin/sh
date >/root/reset_winbindd.log
/etc/init.d/winbind restart >/root/reset_winbindd.log 2>&1



[root@CMU cron.daily]# more rpm
#!/bin/sh

rpm -qa --qf '%{name}-%{version}-%{release}.%{arch}.rpm\n' 2>&1 \
        | sort > /var/log/rpmpkgs




[root@CMU cron.daily]# more slocate.cron 
#!/bin/sh
renice +19 -p $$ >/dev/null 2>&1
/usr/bin/updatedb -f "nfs,smbfs,ncpfs,proc,devpts" -e "/tmp,/var/tmp,/usr/tmp,/afs,/net"



[root@CMU cron.daily]# more tetex.cron 
#!/bin/bash
# Remove TeX fonts not used in 180 days
/usr/sbin/tmpwatch 4320 /var/lib/texmf
exit 0



[root@CMU cron.daily]# more tmpwatch 
/usr/sbin/tmpwatch 240 /tmp
/usr/sbin/tmpwatch 720 /var/tmp
for d in /var/{cache/man,catman}/{cat?,X11R6/cat?,local/cat?}; do
    if [ -d "$d" ]; then
        /usr/sbin/tmpwatch -f 720 $d
    fi
done




[root@CMU cron.daily]# more logrotate 
#!/bin/sh

/usr/sbin/logrotate /etc/logrotate.conf
Topic revision: r3 - 18 Sep 2014, KelleeSummers
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback