Since Scheduled push is not available on Parse , I'm using setTimeout() to schedule pushes. I'm using back4app.
// I call this cloud code
Parse.Cloud.define("pushMultiple",async (request) => {
//Using set timeout to send out a push 1 hour later
setTimeout(pushout,100000);
});
//The function to send Notificaiton
const pushout = () => {
Parse.Push.send({
channels: [ "t1g.com"],
data: {alert: "The Giants won against the Mets 2-3."}
},{ useMasterKey: true });
}
My code works fine. So my question is this:
1) Is my method reliable?
2) What can the disadvantages of this be ?
3) How many setTimeouts() can be queued on the server, is there any sort of limit ?
T.I.A