AnsweredAssumed Answered

Is it possible to prune the database for a specific module only?

Question asked by Sébastien Rainville on May 1, 2019
Latest reply on May 1, 2019 by Sébastien Rainville

In Scheduler, there is a job called "Prune Database on 1st of Month".


In our instance, it is set to active and it does what it suppose to do: once per month, it deletes the record that were marked as "deleted=1".


But we have a specific situation in which we need to do it more frequently but only for a specific module. In other words:

- All records except records of module X: should get pruned once a month

- Record of module X: should get pruned once a week


I assume this it not possible through the admin interface, but I was wondering if it was possible to achieve this through code. Maybe by creating a cron job based on Sugar's default cron job?


Any help is appreciated. Thank you!