Hi I wanted to create a appwrite document that expires after a hour. Would that be possible that it automatically deletes it self at Appwrite itself? Or do I have to manually code this feuture and for loop each time to check if there are not expirations. Maybe queries would work to check for a certain time stamp. But it would be nice if it would be possible to use TTL
I think, right now, the only way to achieve this is to create a function that runs every hour and checks for expired documents and deletes them.
There is a PR out to add that functionality to the function templates. But you should be fine to grap this code and make it your own function. https://github.com/appwrite/templates/pull/238/files
You may have to alter it slightly to support hours instead of just days.
Recommended threads
- Sudden CORS Errors - Domain hasn't Chang...
I have an Appwrite project with two web apps configured, the first one has the hostname `*` and the second one I just added to test if it could fix the issue wi...
- Any way to temporarily bypass the email ...
Hey guys, any way to bypass the email verification to use the accounts again? i need to recover some projects that due to recent changes have been stopped, and ...
- Collections list not showing up when try...
I'm trying to create new relationship attribute but both one way and two way relationship is not showing up collections list to connect with my relationship att...