From: Mark Huang Date: Thu, 18 Jan 2007 22:10:33 +0000 (+0000) Subject: - set up cron on a per-server basis X-Git-Tag: planetlab-4_0-rc1~45 X-Git-Url: http://git.onelab.eu/?p=myplc.git;a=commitdiff_plain;h=feabe171befb088e618f59cdf0b853a356613460 - set up cron on a per-server basis --- diff --git a/plc.d/crond b/plc.d/crond index 64fa7af..7751577 100755 --- a/plc.d/crond +++ b/plc.d/crond @@ -7,7 +7,7 @@ # Mark Huang # Copyright (C) 2006 The Trustees of Princeton University # -# $Id: crond,v 1.5 2006/06/23 20:29:22 mlhuang Exp $ +# $Id: crond,v 1.6 2006/12/12 22:23:04 mlhuang Exp $ # # Source function library and configuration @@ -30,6 +30,7 @@ case "$1" in else MAILTO= fi + cat >/etc/cron.d/plc.cron <>/etc/cron.d/plc.cron + echo "*/15 * * * * root gen-sites-xml.py" >>/etc/cron.d/plc.cron + gen-slices-xml-05.py + check + gen-sites-xml.py + check + fi + + if [ "$PLC_WWW_ENABLED" = "1" ] ; then + echo "*/15 * * * * root gen-static-content.py" >>/etc/cron.d/plc.cron + gen-static-content.py + check + fi + + if [ "$PLC_DNS_ENABLED" = "1" ] ; then + echo "*/15 * * * * root dns-config" >>/etc/cron.d/plc.cron + dns-config + check + fi + + if [ "$PLC_DB_ENABLED" = "1" ] ; then + echo "5 5 * * * root vacuumdb -U postgres --all --analyze --quiet" >>/etc/cron.d/plc.cron + vacuumdb -U postgres --all --analyze --quiet + check + fi plc_daemon crond check