Hi, I'm trying unsuccessfully to configure a sqlcounter that is reset every Sunday 0:00AM. Here's what i configured in radiusd.conf:<br clear="all"><br> sqlcounter weeklycounter {<br> counter-name = Weekly-Session-Time
<br> check-name = Max-Weekly-Session
<br> reply-name = Session-Timeout<br> sqlmod-inst = sql<br> key = User-Name<br> reset = weekly<br><br> # For mysql:<br> query = "SELECT SUM(AcctSessionTime - \
<br> GREATEST((%b - UNIX_TIMESTAMP(AcctStartTime)), 0)) \<br> FROM radacct WHERE UserName='%{%k}' AND \<br> UNIX_TIMESTAMP(AcctStartTime) + AcctSessionTime > '%b'"
<br> }<br><br>After that, I did a radtest. From the resulting
SQL trace, I notice "%b" is expanded as 7 days earlier than today. For
instance, when running radtest on 20 Nov 2007 1:16AM (a Tuesday), "%b"
gets expanded to 13 Nov 2007 0:00AM (a Tuesday too), which is not my
desired outcome.
<br><br>How do I configure a sqlcounter that is reset every
Sunday midnight? Thanks in advance, and sorry if there're any obvious
mistakes that I have overlooked.<br clear="all"><br>-- <br>sc