Home > front end >  How can I schedule firebase messaging to send a message at a specific time everyday?
How can I schedule firebase messaging to send a message at a specific time everyday?

Time:08-26

I would like to use firebase messaging to schedule a message everyday, at a specific time(say 9PM). How can I achieve this? Also, is it possible to achieve this without using firebase cloud functions?

Thanks in advance.

CodePudding user response:

Is it possible to achieve this without using Firebase Cloud Functions?

Yes but in this case you'll need to have your own server for sending message requests to the FCM backend, which will route messages to your client app running on users' devices. As you'll see in the doc this is possible for several languages, as well as by using the REST API.

I would like to use firebase messaging to schedule a message everyday, at a specific time(say 9PM).

You'll have to schedule yourself the process of sending message requests to the FCM backend.

The advantage of using Cloud Functions is that you get all the needed components out of the box with a scheduled Cloud Function: A trusted server environment where your server logic runs with Cloud Function, and a scheduler to run this function as desired.

CodePudding user response:

It will be like making ready-to-use things more complicated by re-inventing them. If you have millions or thousand of users only then it may be cost-effective to in-house this process.

  • Related