#!/bin/sh # # driver for nightly mass-checks on the zone. run from cron as: # 10 9,10 * * * /export/home/automc/svn/spamassassin/build/automc/run_nightly > /var/www/buildbot.spamassassin.org/bbmass/nightly_masschecks.txt 2>&1 # # details: http://wiki.apache.org/spamassassin/NightlyMassCheck # add usernames who you want to do nightlies for here: nightly_users=" doc jm fredt traps " # Ensure we're running after 0900 UTC; complex due to daylight savings. If # we're running in the 08xx UTC hour-space, sleep for 1 hour; when we wake, we # will be in 09xx. By doing it this way, we'll work both for (a) mass-checks # set to run from cron at 09xx (cron doesn't understand DST/UTC issues) and (b) # mass-checks starting at other times that != 09xx. ( TIME="%e,%U,%S"; TZ=UTC; export TIME TZ if date | egrep '^... ... .. 08:'; then date; echo "sleeping for 1 hour to compensate for DST" sleep 3600 ; date fi ) # create the targets files: /export/home/automc/svn/spamassassin/build/automc/populate_cor_nightly echo "run_nightly starting at" ; date # and run each mass-check using "corpus-nightly" for user in $nightly_users ; do /export/home/automc/svn/spamassassin/build/automc/run_one_nightly $user done