# Regular cron jobs for the ndn-mysql5X package

# refresh the tables every night (to help pacct'ing get a better picture of what is going on)
#0 23 * * * root /etc/init.d/mysqld refresh &> /dev/null

# To debug an entire mysql server:
# * * * * *	root	/dh/mysql/scripts/mysql.debug.logger.sh
# * * * * *	root	/dh/mysql/scripts/mysql.debug.logger.sh mysql_instance1 mysql_instance2 ...
# 
# To debug particular users
# * * * * * root /dh/mysql/scripts/mysql.proc.logger.sh mysql_instance user_database

# purge binlogs according to /dh/mysql/etc/binlog_purge/$service
# 52 */4 * * *    root    /dh/mysql/scripts/purge_binlogs.sh &> /dev/null

# expire backups
30 23 * * *     root    /dh/mysql/scripts/expire_backups.pl /mnt/backup/db /mnt/backup/db.nfs &> /dev/null

# check backups report
10 8 * * *      root    /dh/mysql/scripts/mysql.backup.check.pl &> /dev/null

# rotate and analyze log files
#0 */6 * * *     root    /dh/mysql/scripts/loganalyze.pl &> /dev/null

0 */6 * * *		root	for i in /dh/mysql/logs/*.slow ; do echo -n "" > $i ; done

# rotate MySQL err logs & general logs
*/30 * * * *            root    /dh/mysql/scripts/mysql_logrotate.sh &> /dev/null

# start pt-kill procs if they are not running already
0 */1 * * *		root	/dh/mysql/scripts/run_pt_kill.sh &> /dev/null

# clear out pt-kill logs every 6 hours since filebeat would have been sent them to ELK 
0 */6 * * *             root    for i in /dh/mysql/logs/ptkill/*.out ; do echo -n "" > $i ; done
