use the FQDN for PLC_WWW_HOST rather than localhost to get cron.php
[myplc.git] / plc.d / crond
index c828ea7..67a745e 100755 (executable)
@@ -7,7 +7,7 @@
 # Mark Huang <mlhuang@cs.princeton.edu>
 # Copyright (C) 2006 The Trustees of Princeton University
 #
-# $Id: crond 1078 2007-11-15 13:38:27Z thierry $
+# $Id$
 #
 
 # Source function library and configuration
@@ -42,21 +42,9 @@ EOF
 
         # Run all jobs once at startup
 
-#      if [ "$PLC_BOOT_ENABLED" = "1" ] ; then
-#          echo "*/5 * * * * root gen-slices-xml-05.py" >>/etc/cron.d/plc.cron
-#          gen-slices-xml-05.py
-#          check
-       fi
-
        if [ "$PLC_WWW_ENABLED" = "1" ] ; then
-#          echo "*/15 * * * * root gen-static-content.py" >>/etc/cron.d/plc.cron
-#          echo "*/15 * * * * root gen-sites-xml.py" >>/etc/cron.d/plc.cron
-           echo "00 * * * * wget -O - -q http://localhost/cron.php" >>/etc/cron.d/plc.cron
-#          gen-static-content.py
-#          check
-#          gen-sites-xml.py
-#          check
-           wget -O - -q http://localhost/cron.php
+           echo "00 * * * * wget -O - -q http://${PLC_WWW_HOST}/cron.php" >>/etc/cron.d/plc.cron
+           wget -O - -q http://${PLC_WWW_HOST}/cron.php
            check
        fi
 
@@ -67,7 +55,7 @@ EOF
        fi
 
        if [ "$PLC_DB_ENABLED" = "1" ] ; then
-           echo "5 5 * * * root vacuumdb -U postgres --all --analyze --quiet" >>/etc/cron.d/plc.cron
+           echo "5 5 * * * root vacuumdb -U postgres --all --analyze --quiet --full" >>/etc/cron.d/plc.cron
            vacuumdb -U postgres --all --analyze --quiet
            check
        fi