]> dev.renevier.net Git - syj.git/blobdiff - scripts/crontab.syj
include jslint
[syj.git] / scripts / crontab.syj
index 78d48bee268730f9b87cf3c5722aa9d36e610a5f..cf80bef8bc5f9279d621b420049264a8d229e65e 100644 (file)
@@ -5,3 +5,11 @@ MAILTO=arno@renevier.net
 12 3 3 * * /data/project/syj/scripts/updategeoip.sh
 # every day, delete old sessions files
 47 4 * * * find /tmp/ -name "sess_*" -user syj  -ctime +45 -exec rm -f '{}' \;
+# every day, vacuum tables
+48 4 * * * psql syj syj -c "VACUUM ANALYZE users" > /dev/null
+48 4 * * * psql syj syj -c "VACUUM ANALYZE paths" > /dev/null
+48 4 * * * psql syj syj -c "VACUUM ANALYZE pending_actions" > /dev/null
+# every day, clear lighttpd compress cache
+12 5 * * * find /data/work/syj/lighttpd/lighttpd-cache -type f -mtime +2 | xargs -r rm
+# every day, database backup
+12 16 * * * pg_dump -t paths -t paths_id_seq -t pending_actions -t pending_actions_id_seq -t users -t users_id_seq  | gzip > /data/project/syj/backups/db_$(date +'\%Y-\%m-\%d').gz