#
# Regular cron jobs for the avreg-unlink package
# see man 5 crontab

PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

# uncomment string below if locale "ru_RU.UTF8" does NOT support by syslogd
# LANG=C

# uncomment 3 strings below if locale "ru_RU.UTF8" SUPPORT by syslogd
# LC_ALL='ru_RU.UTF-8'
# CONTENT_TYPE='text/plain; charset="utf-8"'
# CONTENT_TRANSFER_ENCODING='8bit'

# The main free space based cleaning task for AVReg with media recording.
# NEVER comment or remove this task.
# default: every 20'th minutes
10,40,50 *	* * *	root	[ -x '/usr/sbin/avreg-unlink' ] && /usr/sbin/avreg-unlink >/dev/null
# or every day, at night at 03:00
# 00 3	* * *	root	[ -x '/usr/sbin/avreg-unlink' ] && /usr/sbin/avreg-unlink >/dev/null

# Optional time based cleaning task for AVReg with or without media recording.
# Uncomment this task to:
#  - (without media recording) Prevent the database growth by "text" (non media) events.
#  - (with media recording) Limit the depth of the archive to the specified value
#    (see date(1) arguments below).
#00 00	* * *	root	[ -x '/usr/sbin/avreg-unlink' ] && /usr/sbin/avreg-unlink "..`date -d'1 month ago' +\%F`" > /dev/null

# weekly, every Tuesday, at early morning 05:00
# do delete and OPTIMIZE sql
00 5	* * 2	root	[ -x '/usr/sbin/avreg-unlink' ] && /usr/sbin/avreg-unlink --optimize >/dev/null
