Back

How to execute a cloud function, 15 minutes from now?

  • 0
  • Android
  • Flutter
  • Functions
  • Cloud
Eilon
14 Jul, 2024, 15:27

I have a flutter android app. What I need is: When a user clicks on a button - after x amount of minutes, the app will get a push notification.

I thought to implement that by - the app should be with a user login mechanism. When the user clicks on a button, the app will trigger a cloud function via http request, this cloud function will create a new cron job, scheduled to the time needed (for example, 15 minutes from now). Than, the cron job will send push notification with FCM to the client app.

Is my "planning" is ok? this is the proper way of doing this kind of task? Thanks

TL;DR
Developers using a Flutter Android app want to trigger a push notification 15 minutes after a user clicks a button. To achieve this, they plan to implement a user login mechanism that triggers a cloud function via an http request. This cloud function will create a cron job scheduled for 15 minutes in the future to send a push notification with FCM. This approach seems suitable for the task at hand.
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