简体   繁体   中英

Create daily push notification using Firebase Cloud Messaging

In the Firebase console we can set a specific time and date when will our notification will be push. But is there a way that we can set it daily? For example it will send every Monday, Wednesday and Friday or everyday?

Recurring messages are available in FCM now. May be helpful to someone.

每日

定制

Push campaigns with Firebase Notifications can be sent now or later (scheduled).

You could probably switch to Firebase Cloud Messaging , use their HTTP API and then build a cron script to trigger your notifications automatically on these days.

Or switch to a more mature product like Parse Server, Batch.com or anything else as they usually provide that daily/weekly/monthly recurring push notifications feature.

If you want to schedule functions to run at specified times, use functions.pubsub.schedule().onRun() This convenience method creates a Google Cloud Pub/Sub topic and uses Google Cloud Scheduler to trigger events on that topic, ensuring that your function runs on the desired schedule.

https://firebase.google.com/docs/functions/schedule-functions

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM