Hello i'm trying to make a front end form for post that will auto expire after a while ( for testing purposes i set expiration after 20 minutes ) and 10 minutes before expiration i want to send an email to user that post will expire.
the problem is that auto expiration does not work for my site ( email notification for post expiration - and post that created with that form does not expire).
i followed this : https://toolset.com/documentation/user-guides/front-end-forms/automatic-post-expiration/
Hello and thank you for contacting the Toolset support.
The scheduling of expiration and automatic notifications are managed by the WordPress cron system, I suspect, that the interval of the expiration is larger than the 20 and 10 minutes you are testing, or that the cron system is not triggered. WP-Cron does not run constantly as the system cron does; it is only triggered on page load. Check the cron documentation here https://developer.wordpress.org/plugins/cron/
For the first possibility, you can customize an expiration interval of 2 minutes with custom code, check section"Customizing Automatic Post Expiration using filters" of our article https://toolset.com/documentation/user-guides/front-end-forms/automatic-post-expiration/#customizing-automatic-post-expiration-using-filters
Then try to visit the website every 2 minutes for 6 times, to be sure that the 10 minutes is reached and the cron is triggered.
I hope this helps. Let me know what you will get.