am-impact / amforms

Forms plugin for Craft
Other
122 stars 21 forks source link

How to set up auto cleaning cronjob? #178

Open groe opened 6 years ago

groe commented 6 years ago

Hi there!

I don't fully understand how to use the new "Clean up submissions" feature from 1.9.0. It's enabled by default; do I have to set up anything else, like an actual cronjob? If so, how?

Thank you!

Benjamin

hubertprein commented 6 years ago

Set up a cronjob on your hosting platform, that calls the clean up action (actions/amForms/submissions/cleanUp) from the submissions controller. The CP settings define whether or not it will do anything which old submissions should be deleted.

groe commented 6 years ago

Works, thank you!

Have you considered adding this to the README? Maybe with an example crontab entry? I can make a PR if you're fine with it.

hubertprein commented 6 years ago

Glad you got it working :)

I'll accept the PR if you have the time to add it there.

groe commented 6 years ago

Whoops that took a while :grimacing:

Here's the PR: #185