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
- Send Email Verification With REST
I am using REST to create a user on the server side after receiving form data from the client. After the account is successfully created i wanted to send the v...
- Use different email hosts for different ...
Hello, I have 2 projects and i want to be able to set up email templates in the projects. Both projects will have different email host configurations. I see ...
- Project in AppWrite Cloud doesn't allow ...
I have a collection where the data can't be opened. When I check the functions, there are three instances of a function still running that can't be deleted. The...