I was wondering if Schedule Push is available on Parse Server? (I'm using Back4App)
Here is my cloud code:
Parse.Cloud.define("pushMultiple",async (request) => {
//Getting Current Date instance
var d = new Date();
//Where I live Current Hour is 14, so setting it to 15
d.setHours(15);
//Sending push to a specific device
return Parse.Push.send({
push_time: d,
channels: [ "t1g.com"],
data: {alert: "The Giants won against the Mets 2-3."}
},{ useMasterKey: true });
});
But the code does not seem to be working. The push is sent out immediately.
And if it's not possible, please let me know how I can schedule push using a Cloud Job. A code snippet would be very helpful. Also will the Cloud Job stop running after it has completed sending the push?