Parse.com 安排定期推送

Parse.com schedule a recurring push

是否可以通过 Parse.com 安排每天在特定(本地)时间发送推送通知?我已经想出如何在当地时间安排推送,但不知道如何让它们每天发生。

您可以定期安排 background job 到 运行 并以编程方式触发其中的推送。

Parse.Cloud.job('sendRecurringNotification', function(request, response) {        
    Parse.Push.send({
        channels: ['a-reminder'],
        data: {
          alert: 'The kitchen is closing in 25 minutes'
        }
     }, {
        success: function() {
          response.success('scheduled order reminder notification')
        },
        error: function(error) {
          response.error('unable to schedule order reminder notification with error ' + error)
        }
    })
})