I am trying to run the following parse background job in Cloud Code
Parse.Cloud.job("sendAlert", function(sendAlert) {
Parse.Push.send({
data: {
"content-available": 1,
}
}, {
success: function() {
status.success("Push Worked!!!");
},
error: function(error) {
status.error("Uh oh, something went wrong.");
}
});
});
with the intended result of, when it is run, a "transparent" (not seen by users, but seen by the app) push being sent to users.
When I run it, I get the error
Jobs: sendAlert E2015-02-20T19:17:22.637Z] v17: Ran job sendAlert with: Input: {} Failed with: ReferenceError: status is not defined at Object.Parse.Push.send.error (main.js:12:5) at Parse.js:2:7940 at f (Parse.js:2:6852) at Parse.js:2:6344 at Array.forEach (native) at Object.x.each.x.forEach [as _arrayEach] (Parse.js:1:661) at c.extend.reject (Parse.js:2:6297) at Parse.js:2:6956 at f (Parse.js:2:6852) at Parse.js:2:7386
in the log. What am I doing wrong? Thanks, and appreciate it - total Parse novice here.