How can I get a function to run 30 minutes after an event, say, to send additional emails in reaction to a user sign up.
Scheduled functions apparently only allow for recurring functions (daily, weekly, every tuesday etc etc), but I want a delayed function.
Summary
You cannot directly create a delayed function in Appwrite. Scheduled functions are only for recurring tasks. One workaround could be to use counters linked to the event, but it may not work for a 30-minute delay. Another option is to create a function that checks the current time until the scheduled time is reached using a loop and the `time.sleep(1)` function. However, note that the maximum execution time for a function in Appwrite is 15 minutes, so this solution may not be ideal.
Dakshie
Octerns
Jun 5, 2023, 23:07
I don't think there is any feature as a delayed function,
But maybe you can create a function thats something like this
Plain text
time.sleep(1)
current_time = datetime.now()```
Dakshie
Octerns
Jun 5, 2023, 23:09
But then, the max execution time of a function in appwrite is 15mins