#minute (0-59),
#|	hour (0-23),
#|	|	day of the month (1-31),
#|	|	|	month of the year (1-12),
#|	|	|	|	day of the week (0-6 with 0=Sunday).
#|	|	|	|	|	user
#|	|	|	|	|	|	commands
#sum stats of past month
15	4	1	*	*	root	katrin-db-service sumstats month "$(date -d '-1 month' '+\%Y-\%m-01')" > /dev/null 2>&1
#sum stats of past day
7	4	*	*	*	root	katrin-db-service sumstats day "$(date -d yesterday '+\%F')" > /dev/null 2>&1
#sum stats of past hour
1	*	*	*	*	root	katrin-db-service sumstats hour "$(date -d '-1 hour' '+\%F \%H:00:00')" > /dev/null 2>&1

# Settings for update today stats. Default every 5 minutes. Edit or comment it if you have overload db.
#sum stats of past month, day and hour
*/5	*	*	*	*	root	katrin-db-service sumstats month "$(date '+\%Y-\%m-01')" > /dev/null 2>&1; katrin-db-service sumstats day "$(date '+\%F')" > /dev/null 2>&1; katrin-db-service sumstats hour "$(date '+\%F \%H:00:00')" > /dev/null 2>&1

#delete stats older 3month
#5	4	1	*	*	root	katrin-db-service cleanstats "1970-01-01 00:00:00" "`date --date='-3 months' +\%F` 00:00:00"

#writeoff cost by day
0	5	*	*	*	root	katrin-db-service writeoff_day

#writeoff cost by month
0	10	*	*	*	root	katrin-db-service writeoff_month

