how to delete document after certain time in a collection
- 0
- Self Hosted
- Flutter
- Databases
- Functions
how can i achieve this the best way are there any limitations?
You can mark the document that needs to be deleted and then create a function that can delete marked documents in bulk, and then schedule that function using cron: learn more about scheduling here: https://appwrite.io/docs/products/functions/execute#schedule
how do i mark a document?
okay, so for example create new collection called "delete-this-docs" that no one can access, and create attribute to store the document path. now you can keep adding docs here that you want to delete and then you can read this collection from Appwrite server SDK inside appwrite function, and delete all those docs from path stored and also delete record of that docs from "delete-this-docs" collection.
Learn more about server SDK here: https://appwrite.io/docs/sdks#server Learn more about function here: https://appwrite.io/docs/products/functions/functions
ill take a look at it thanks
edited
ok
Recommended threads
- Help
- Python TablesDB Rework
Hi, i starting to rework some older functions to TablesDB list_rows Method. I used list_documents with a resultset with worked fine. Now i tried to get all rows...
- HUGE OUTRAGE IN APPWRITE, I CANNOT ACCES...
I have 2k users trying to access, sending me messages. What am I supposed to do? Please solve this asap.