1

I am building an appointment booking app, I'm using FCM to handle push notifications, so I am wondering if there is a way to schedule push notifications For example;

When the doctor gives an appointment time, the patient should be notified few minutes to the appointment time. I've read about cron job but I'm not sure on how to schedule it to a dynamic time.

CharlyKeleb
  • 587
  • 4
  • 17

1 Answers1

2

You can either run a scheduled task at a fixed interval (say every minute) and then send all messages for the past/next minute, or you can use Cloud Tasks to schedule the task (which is then a HTTP Cloud Function) either yourself (as Doug explained here) oras shown in this documentation.

This topic has been covered quite a few times before, so I recommend also checking out:

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807