Parse Server – How to use a scheduler to run ‘jobs’ over and over

Question:

I have spent an entire day trying to get some kind of scheduler working with my Parse Server (running on AWS Beanstalk Node.js)
I was able to get some code inside the js file but it did not seem like it was working.
Is there any way I can set up some kind of scheduler so I don’t have to manually run my jobs through the Dashboard?

Answer:

You have Configure the nodejs cron job for parse-server job schedule.

  1. install “CRON” module – npm install cron,(reference:https://www.npmjs.com/package/cron).
  2. Change the parse server job Schedule function declaration. Parse.Cloud.job("jobScheduleName", function(){ })
    to
    function jobScheduleName() { };
  3. Run cron

Leave a Reply