Auto-delete old data (cron jobs)
You can use the provided cron jobs to automatically delete old data in order to keep the database size low and maintainable for many years.
Most data usage comes from heatmaps and recordings.
How to run the cron jobs
Note: This assumes that your dashboard is installed at /var/www/html/. Update the paths accordingly if your dashboard is installed at a different location. You might first have to run sh /var/www/html/server/cron/set_exec_permissions.sh to make sure that cronjob can execute the scripts.
Edit the crontab file to set what scripts to execute when, by running crontab -e
.
Add the scripts you want to be executed, like this:
You can use the nano
editor for modifying this file. You can press CTRL+O to save the file and CTRL+X to exit.
Notes
0 3 * * *
= Every day at 3 AM
Tool to understand the cron time syntax: https://crontab.cronhub.io/
/var/www/html/server/cron/log.txt Will contain the execution date and time logs for the scripts that were run.
Built-in example scripts
There are currently no cron job examples for Multi-DB Agency setups. Those cron jobs will only delete data in the main database.
UXWizz comes with some helper and example scripts that can be used for cron jobs.
To change the retention numbers or create other scripts, you can copy one of the example .sh files and edit it. (e.g. change interval from 60 days to 6 months).
Last updated