# This file is $Header: /afs/sipb.mit.edu/project/foo-server/charon/etc/RCS/nightly_jobs.conf,v 1.21 2000/05/21 06:37:13 jweiss Exp $.  Edit it there.
# 
# The format of this file a series of job entries.  Each job entry
# starts with a line of perl code (which is evaluated) and then one or
# more lines of input to the shell.  The line of perl code can set the
# following variables:
# 
# $owner	where output should be sent (default is "root")
# $name		job title for mail reports (optional)
# $prefix	perl expression to run against all lines in the input
#		(with each line set to $_) to determine which ones
#		should be fed to the shell and which should be
#		ignored.  The default is "/^/".  If you want to use a
#		prefix, you would use something like "s/^prefix://".
#		If the expression evaluates to true, the line is fed
#		to the shell.
# $terminator	expression to end job input (default is "/^$/", i.e.,
#		job intput is terminated by a blank line)
# $shell	The shell to use (default is "/bin/sh").
# $important	If the previous night's invocation of the nightly_jobs
#		script is running when the script starts up, it waits
#		until the previous night's invocation is finished, and
#		then only executes jobs that are marked as important
#		(e.g., "$important=1;").
# 
# Inside job input, lines that don't match the prefix or the
# terminator are ignored.
# 
# Outside of job input, blank lines, lines containing only whitespace,
# and lines starting with `#' are ignored.

# $owner="www-report@mit.edu"; $name="syslog turnover";$important=1;
# /usr/local/bin/gnewsyslog -f /var/local/www/logs/newsyslog.conf
#
# $owner="www-report@mit.edu"; $name="log processing";$important=1;
# /var/local/www/logs/digest.pl

#$owner="ca-maintainers"; $name="Central America run";$important=1;
#if [ ! -r /usr/spool/ca/ca_lock ]; then
#	cd /usr/spool/ca
#	./ca.pl > ca_errs 2>&1
#fi

$name = "charon local mail cleanup";
/usr/local/bin/mail-lossage

#$name = "check-backups";$important=1;
#/usr/local/backup/bin/check-backups -m -n

#$name = "clean-db";$important=1;
#/usr/local/backup/bin/run-clean-db

$name = "deleted files cleanup";
DIRS=`/bin/mount | /bin/awk '/ ufs$/ {print $3}'`
/usr/local/bin/gfind $DIRS -xdev -depth -name '.#*' -ctime +3 \( \( -type d -exec /bin/rmdir {} \; \) -o -exec /bin/rm -f {} \; \)

# $owner="www-report@mit.edu"; $name="copying WWW server root to AFS";
# /var/local/www/sync/sync-root.sh
