parse-javascript-sdk

Using setTimeout() to Schedule pushes

拜拜、爱过 提交于 2020-07-09 14:47:06
问题 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

Using setTimeout() to Schedule pushes

ε祈祈猫儿з 提交于 2020-07-09 14:45:11
问题 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