#
# Regular cron jobs for the ndn-analog package
#
# first schedule a rotate to run via at
0 15	* * *	root	/dh/bin/weblogrotate.pl schedule 00:00-01:00
# gzip logs in the evening
23 19    * * *	root	/dh/bin/weblogrotate.pl gzip
# schedule calcstats
0 15	* * *	root	/dh/bin/run_calcstats.pl schedule 03:00-04:00
# run analog in the early morning, randomize times over an hour to reduce disk access on vserver hosts
30 2	* * *	root	echo "/dh/bin/run_analog.pl daily" | at now+`/usr/local/dh/bin/randomtime.pl 60`min &> /dev/null
# monthly analog cache rotation
0 10	5 * *	root	/dh/bin/run_analog.pl monthly
# clean out old stuff
13 3	* * *	root	find /root -maxdepth 1 -name "logrotate_local*" -mtime +7 -exec rm {} \;
27 10	* * *	root	find /root -maxdepth 1 -name "analog_local_daily*" -mtime +7 -exec rm {} \;
28 10	8 * *	root	find /root -maxdepth 1 -name "analog_local_monthly*" -mtime +65 -exec rm {} \;
29 10	* * *	root	find /root -maxdepth 1 -name "calcstats_local.daily*" -mtime +7 -exec rm {} \;
43 21	* * *	root	find /var/cache/analog -name dnscache -size +10000k -exec rm {} \;
