Skip to content

Unable to schedule push notifications - always firing immediately #2612

Closed
@joeybenenati

Description

@joeybenenati

Issue Description

I am unable to get scheduled push notifications to fire at the date/time specified in the push_time property using parse-server on node. No matter what time I specify, or what format (js Date object, ISOString, etc) it always fires the push immediately. I am receiving on iOS client.

Steps to reproduce

Please include a detailed list of steps that reproduce the issue. Include curl commands when applicable.

following Hector's post at https://www.parse.com/questions/push-to-local-timezone-from-cloud-code...

var query = new Parse.Query(Parse.User);
  return query.find().then(function(users) {
    var installQ = new Parse.Query(Parse.Installation);
    installQ.containedIn('user', users);
    return Parse.Push.send({
      where: installQ,
      push_time: '2016-08-29T12:00:00.00',
      data: {
        alert: alert
      }
    }, {
      useMasterKey: true
    }).then(function() {
      console.log('done');
    }, function(error) {
      console.log(error);
    })
  });

Expected Results

iOS client receives push notification at local lime specified in push_time 2016-08-29T12:00:00.00

Actual Outcome

iOS client receives push notification immediately

Environment Setup

  • Server
    • parse-server version 2.2.18
    • Localhost or remote server? (AWS, Heroku, Azure, Digital Ocean, etc): Heroku
  • Database
    • MongoDB version: 3.0.10
    • Localhost or remote server? (AWS, mLab, ObjectRocket, Digital Ocean, etc): mlab

Logs/Trace

You can turn on additional logging by configuring VERBOSE=1 in your environment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions