X-Git-Url: https://dev.renevier.net/?p=syj.git;a=blobdiff_plain;f=scripts%2Fcrontab.syj;h=a8b7871c85aba8391c452bc6d9cee659254298d5;hp=e8c0c1157d85eec49cb18bc99393d84d3f14d571;hb=c06c7fd6e6f26d31abb8d7c9a9f9e3f2d5b27d5c;hpb=190fd621df4920c56a422c03663874cddaa67d64 diff --git a/scripts/crontab.syj b/scripts/crontab.syj index e8c0c11..a8b7871 100644 --- a/scripts/crontab.syj +++ b/scripts/crontab.syj @@ -1,5 +1,13 @@ MAILTO=arno@renevier.net # every 5 minutes, call syj php cron -*/5 * * * * /usr/bin/wget --header="Host: osm-syj.crans.org" http://localhost/cron -O /dev/null -o /dev/null +*/5 * * * * /data/project/syj/scripts/cron.php # every month, update geoip db -0 0 3 * * /data/project/syj/scripts/updategeoip.sh +12 3 3 * * /data/project/syj/scripts/updategeoip.sh +# 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