Background Jobs

Background jobs are set of process that runs behind (background). Thus jobs execute seamlessly and do not disturb foreground processes and operations. Background jobs can be scheduled to run in the night because that time system load is low.

Advantages of Background Job

1. It reduces manual effort.

2. No need user interaction and can run seamlessly in the background without user input.

3. User confusion is also reduced because the user doesn’t have to worry about value input in the field.

How to schedule the background job in parse.com

Step 1) Open your main.js in cloud folder and write a parse job script,Similar to Cloud Functions.Your code would look like this.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
Parse.Cloud.job("MyfunctionName", function(request,response) {
  
  }).then(function() {
    // Set your response call back message
    response.success("Job completed successfully.");
  }, function(error) {
   //set your Error call back message
    response.error("job failed");
  });
});

Step 2) Deployed your code,  after that you can schedule job in the Parse Dashboard.

Your Parse Dashboard –>select your application –>Core–>Jobs

schedule a Job” on top right tab.

Background jobs in parse

Step 3) Now you can Schedule Job.Choose your job name , give parameter and description and schedule the job by click on schedule job button

Background jobs in parse

Limitations

1. Jobs will be terminated after 15 minutes of run time.

2. Apps may have one job running concurrently per 20 request/s in their request limit.

3. Jobs that are initiated after the maximum concurrent limit has been reached will be terminated immediately.

Need help?

We are Perfomatix. We specialize in building highly scalable APIs and Mobile apps and we also have strong expertise in IoT appsVirtual Reality apps, and Augmented Reality appsGet in touch with us to find out how we can help in shaping your disruptive idea into a prototype, MVP and finally into a killer product. Visit our success stories section to find out more about some of the startups which made it big with us.


captcha

X