MODX Community

Formit: cronjob task for automatically deletion of old forms

can anyone address me on how to set up a cronjob task for automatically deletion of old forms in formit (due to GDPR requirement)?
I use modxcloud hosting.

Thanks in advance.

This can be done by creating a script that loads MODX externally. You can read a bit more about that here:

You’ll want this script in a protected directory or behind the webroot since it has the power to delete, but basically you can just search for anything older than X days and remove it.

Thanks matdave,
as i read in the documentation of the extras is already available a cron job task (since version 4.1.1) for automatically deletion of old forms, but i don’t understand where is and in which way use it.
I’ll give a look and try using your indications.

I think the package installation tells you the exact path/command for the cron job. Would be useful to add to the docs for sure - but it’s not there now.

Once you have the command, you can follow the using cron in MODX Cloud help page to get it set up.

Thanks mark,
i’ll go deeper in the package and give a try.