Back

Scheduled Execution from SDK

  • 0
  • Functions
Aarush Acharya
6 Oct, 2023, 19:28

Hey all I am building a Flutter app and want to create scheduled executions of a fucntion from SDK will that be possible ??

TL;DR
The user is looking for guidance on implementing a reminder feature in an open-source project using Appwrite as the BaaS. They propose two ways: using a cron job that runs every 5 minutes to check for reminders and send notifications, or creating a new function for each reminder to be scheduled to run at the appropriate time. They are looking for advice on which method is better or if there are any other alternatives. The solution is to schedule an execution using cron expressions in the function settings. The user initially wanted to schedule the execution through the client SDK but later discovered that it can be done through the function settings.
Drake
6 Oct, 2023, 19:40

what have you found so far from your research? where have you looked?

Aarush Acharya
6 Oct, 2023, 20:59

I have looked into the docs of Appwrite concerning executions I learned about corn expressions that can be used to schedule a cron function I believe this might help me

So I explored corn expressions and learned how to use them, now I need a way to schedule an execution through my Flutter apps I tried to browse the docs but all it says is the execution can be scheduled using cron expressions in your function settings I am looking for a way to do it using client SDK (not to create an execution rather schedule it )

Okay I figured its in the function docs rather than executions thanks

Aarush Acharya
6 Oct, 2023, 21:10

Also @Steven I wanted a little guidance

I am contributing to an open source project named Resonate it uses Appwrite as the BaaS I need to implement a reminder sort of feature where the users sets reminder and atv that time a push notification needs to be sent fromt he server What could be the best way to implement it I had two ways in my mind

Way 1: A cron fruntiosn that runs every 5 mins fetches data from data base and subtracts current time from it and checks if the difference is less than 5 then it sends the notifications

Way2: create an entire new function for each remined the function will be scheduled to run only once and at the time of the set reminder this could give better accuracy with time

Which way could be better or if there is any other better way please do let me know of it, please do help

Drake
6 Oct, 2023, 22:51

way 2 doesn't sound like it will scale.

way 1 is what i would do

Aarush Acharya
6 Oct, 2023, 22:52

Understood, is there any other way ?

Drake
6 Oct, 2023, 23:03

not at the moment

Aarush Acharya
6 Oct, 2023, 23:07

Understood thanks

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more