[asterisk-users] cdr-custom rotate?
Tony Mountifield
tony at softins.clara.co.uk
Sat Aug 9 04:56:55 CDT 2008
In article <200808090226.00264.tilghman at mail.jeffandtilghman.com>,
Tilghman Lesher <tilghman at mail.jeffandtilghman.com> wrote:
> On Saturday 09 August 2008 01:53:49 Venefax wrote:
> > I have to rotate the Master.csv every 5 minutes, on a heavy loaded system.
> > I use cdr-custom. How do I force asterisk to rename the cdr file every 5
> > mins? Is there a way?
>
> Add to your crontab:
>
> */5 * * * *
> mv /var/spool/asterisk/cdr-custom/Master.csv /var/spool/asterisk/cdr-custom/Master-`date
> +%Y%m%d-%H%M`.csv
> (all on one line)
You will need to escape the % chars with \ to keep cron happy
(as I discovered when I tested my solution before posting :-)
Cheers
Tony
--
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org
More information about the asterisk-users
mailing list