Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

Can I run function on Parse cloud code that will send push notifications to users in order. For example send push to user1, after 5 min send push to user2, etc? I mean could I schedule or invoke some function after n minutes for example. Will be grateful for any help. Thanks

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
184 views
Welcome To Ask or Share your Answers For Others

1 Answer

You can schedule background jobs. Create a job as you wish, for example:

Parse.Cloud.job("my_job", function(request, response) {
    response.success("Ran scheduled job.");
});

Deploy that to your Parse App and go to your Cloud Code dashboard, then click on Scheduled Jobs. From there, click on Schedule a Job and set up the first time it should be called and it's frequency. Simply save that and you are ready! :)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...