From 88fb1a1a12528911978a50a65fdf89b219f3b689 Mon Sep 17 00:00:00 2001 From: "Pierre Habouzit (MadCoder" Date: Sat, 15 Jan 2005 10:34:06 +0000 Subject: [PATCH] handle crontabs from plat/al git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-333 --- ChangeLog | 1 + bin/cron/{send_notifs.php => notifs.send.php} | 0 configs/platal.cron | 26 ++++++++++++++++++++++++++ upgrade/0.9.4/update.sh | 6 +++--- 4 files changed, 30 insertions(+), 3 deletions(-) rename bin/cron/{send_notifs.php => notifs.send.php} (100%) create mode 100644 configs/platal.cron diff --git a/ChangeLog b/ChangeLog index 857a7b8..bee33ac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -16,6 +16,7 @@ New : - No more .head.tpl. (thanks to JM for the tip). -MC - Strip unnecessary spaces from templates at compile time. -MC - Allow users to choose email formats globally. -Car + - Crons are now handled from plat/al with a global crontab file. -MC * Contacts : - Brand new PDF of the contact list (using FPDF). -MC diff --git a/bin/cron/send_notifs.php b/bin/cron/notifs.send.php similarity index 100% rename from bin/cron/send_notifs.php rename to bin/cron/notifs.send.php diff --git a/configs/platal.cron b/configs/platal.cron new file mode 100644 index 0000000..0400756 --- /dev/null +++ b/configs/platal.cron @@ -0,0 +1,26 @@ +MAILTO=root +PATH=/bin:/usr/bin:/usr/local/bin:/home/web/bin +WD=/home/web/prod/platal/bin/cron + +# stats +25 0 * * * web cd $WD/stats; ./evolution-inscrits-mails ; ./plot-graphs ; ./mailParselog + +# db +0 5 * * * web cd $WD; ./clean.php +0 21 * * 1-6 web cd $WD; ./checkdb.php | mail -e -s "verifications sur la BDD de plat/al" br@m4x.org +0 21 * * 0 web cd $WD; ./checkdb.php -v | mail -e -s "verifications verbose sur la BDD de plat/al" br@m4x.org + +# inscription report +0 6 * * 1 web cd $WD; ./rapports_inscription.php + +# notifs +0 2 * * * web cd $WD; ./notifs.birthday.php +0 4 * * 6 web cd $WD; ./notifs.send.php + +# validations +0 */3 * * * web cd $WD; ./cron_validations.php + +# search +0 */3 * * * web cd $WD; ./recherche.pl 0 + +# vim:set noet syntax=crontab ts=8 sw=8 sts=8: diff --git a/upgrade/0.9.4/update.sh b/upgrade/0.9.4/update.sh index 07e9d08..807a287 100755 --- a/upgrade/0.9.4/update.sh +++ b/upgrade/0.9.4/update.sh @@ -30,7 +30,7 @@ You now have to : and add a rewrite rule on www.polytechnique.org (http and https) : ^/banana/([^/]*/.*)$ /usr/share/banana/\$1 -(*) install the new cron : bin/cron/notifs.birthday.php - suggested : - 0 1 * * * ...../bin/cron/notifs.birthday.php +(*) install the new cron system : + delete ALL web crons from the crontab EXCEPT for the /home/web/bin/espace_disque that is not a plat/al feature + and then, link /etc/cron.d/platal -> platal/configs/platal.cron " -- 2.1.4