I would like to find a way to accomplish the following:
Once a day a job should be executed that moves all documents older than 30 days from one collection to another collection and deletes personal user data.
Is there a way to do this with an appwrite function? Or has anyone ever done something similar?
Summary
The user is asking if rate limiting is an issue when running a function in the Appwrite instance. The solution suggested is to install the Appwrite Docker instance or test the function in the Appwrite cloud. The user is also advised to use the Appwrite server or the Appwrite CLI for testing. Lastly, the user asks if it's possible to execute a daily job using an Appwrite function to move documents and delete user data, to which a solution is not provided in the thread.
ilikechicken77
Rank 2: Process
Jul 18, 2023, 12:11
yes you can set cron schedules for functions pretty easily from the console
So the correct way would be to first write a function locally and test it with the appwrite-cli and then install the function on the appwrite server, which then executes this function via cron execution?
D5
Moderator
Jul 18, 2023, 12:20
Yes
D5
Moderator
Jul 18, 2023, 12:21
Well, with appwrte CLI you can't test it, just deploy
D5
Moderator
Jul 18, 2023, 12:21
So you will need to test in the server. You could use a separate instance (for example a local instance)
ozonko89
Rank 1: Thread
Jul 18, 2023, 12:22
Ok but i can test it then with the server "node-appwrite" package.
D5
Moderator
Jul 18, 2023, 12:22
Sorry, what do you mean?
ozonko89
Rank 1: Thread
Jul 18, 2023, 12:23
My Aplication Server with the appwrtite node Package installed
D5
Moderator
Jul 18, 2023, 12:24
Appwrite uses a different way/template, so I recommend testing it directly in an Appwrite instance (it could be a local one in your computer)
D5
Moderator
Jul 18, 2023, 12:25
Or you could use Appwrite cloud
ozonko89
Rank 1: Thread
Jul 18, 2023, 12:25
Ok i should install appwrite Docker instanz and test the function there
ozonko89
Rank 1: Thread
Jul 18, 2023, 12:26
Sorry one more question:
Is rate limiting any problem when the function is running in the Appwrite instanz?