- install mailx and sendmail, build script sends mail on failure
[myplc.git] / plc.d / crond
index 5bb5ba7..64fa7af 100755 (executable)
@@ -7,13 +7,19 @@
 # Mark Huang <mlhuang@cs.princeton.edu>
 # Copyright (C) 2006 The Trustees of Princeton University
 #
-# $Id: crond,v 1.1 2006/04/06 21:51:59 mlhuang Exp $
+# $Id: crond,v 1.5 2006/06/23 20:29:22 mlhuang Exp $
 #
 
 # Source function library and configuration
 . /etc/plc.d/functions
 . /etc/planetlab/plc_config
 
+# Be verbose
+set -x
+
+# Export so that we do not have to specify -p to psql invocations
+export PGPORT=$PLC_DB_PORT
+
 case "$1" in
     start)
        MESSAGE=$"Starting crond"
@@ -34,6 +40,8 @@ HOME=/
 */5 * * * * root gen-slices-xml-05.py
 */15 * * * * root gen-sites-xml.py
 */15 * * * * root gen-static-content.py
+*/15 * * * * root dns-config
+5 5 * * * root vacuumdb -U postgres --all --analyze --quiet
 EOF
 
         # Run them once at startup
@@ -43,6 +51,10 @@ EOF
        check
        gen-static-content.py
        check
+       dns-config
+       check
+       vacuumdb -U postgres --all --analyze --quiet
+       check
 
        plc_daemon crond
        check