Routine Purging of Call Log Data? #19
Replies: 3 comments 5 replies
-
Or... You could write a shell script to do this and set it up as a CRON job under the same account running CA. More flexible approach and not necessary to complicate the main application with task scheduling. |
Beta Was this translation helpful? Give feedback.
-
That could sure work. But I wasnt thinking any real scheduling. Just at startup, if the configured days isnt zero (for never clean the data), simply execute the above sql. |
Beta Was this translation helpful? Give feedback.
-
The sqlite command line is pretty learn-able - and you can copy the db file, and experiment with the copy. For semi-related reference, here's the clunky script I use to dump some tables to CSV: https://github.com/roycewilliams/callattendant-resources/blob/main/db-to-csv.sh A "DELETE FROM [tablename] WHERE [condition]" should be relatively easy to script. |
Beta Was this translation helpful? Give feedback.
-
While I am still very new to this so this is no problem for me now. But it seems that over time, the call log data really might get voluminous and/or out of date. As such, I wonder about a configuration item that specifies a retention period (perhaps in days) for the call log data and a mechanism (perhaps executed at startup time) to remove any data older than the specified number of days?
Seems like this SQL would do the trick:
delete from CallLog where SystemDateTime < DATETIME('now', '-xx day')
Beta Was this translation helpful? Give feedback.
All reactions