Reputation: 253
I wanted to schedule a Firebase notification to be sent after an hour of placing an order. I'm using Nodejs and an HTTP request to send the notification. The notification is not recurring, I just need it to be sent after an hour of order placement and then stop. I already know how to send a notification, I just wanted to know how to schedule it to run after an hour.
Upvotes: 0
Views: 791
Reputation: 83191
One solution is to send the notification via a Cloud Function. You'll find in the following article all the details on "How to schedule a Cloud Function to run in the future with Cloud Tasks".
The code in the Cloud Function will be very similar to the code you are using with your Node.js server, since Cloud Functions for Firebase are based on the Admin SDK.
Upvotes: 1