Background job related questions

33 views
Skip to first unread message

mrin...@gmail.com

unread,
Jun 5, 2017, 11:55:49 AM6/5/17
to back{4}app
Hello, I am trying to write a background job which will make a api call multi times and save data into the parse database and have a frequency of every 3 hours. So what's the maximum running time of a script? 
Is it 15 minutes like Parse.com?
Should i use the parse background job or Heroku or others since it might be a long running task (might be as long as 30 mins)?
Is there a guarantee of the job script getting executed?
Is there a limit on the number of objects i can save in the saveAllInBackground() call? 
Will a single saveAllInBackground() saving 10 objects count as 1 api call or 10 api calls? 
Please help.

casag...@back4app.com

unread,
Jun 5, 2017, 12:28:05 PM6/5/17
to back{4}app, mrin...@gmail.com
Hello!

Background Jobs run for 15 minutes and the guarantee for working depends on the code implemention. We have lots of users that have jobs working properly so it should run normally for you as well depending on the complexity of your code.

Also for your saveAllInBackground() question, I'd suggest you to check this link and it's answers: https://stackoverflow.com/questions/23841017/how-do-i-save-thousands-of-objects-to-parse-com

Best!

mrin...@gmail.com

unread,
Jun 5, 2017, 2:07:29 PM6/5/17
to back{4}app, mrin...@gmail.com
Thank you for the answer. I implemented a job and did run it a number of times yesterday. When I checked the status of those jobs in the dashboard, their status is shown to be running. So are all the jobs running since yesterday or is it a UI fault and those jobs have shut down? I am confused, please help. Thank you. 

casag...@back4app.com

unread,
Jun 5, 2017, 2:21:11 PM6/5/17
to back{4}app, mrin...@gmail.com
Hello!

No, the jobs are not running since yesterday. As I told you the limit of a job to stay running is of 15 min. The Dashboard only shows up when the job starts and don't shows when the Job finishes. What can be done is to set some logs to see when it's done.

Best!

mrin...@gmail.com

unread,
Jun 5, 2017, 5:15:06 PM6/5/17
to back{4}app, mrin...@gmail.com
Thanks. Lastly, Can you clarify if saving 10 objects in a saveAllInBackground() count as 1 api call or 10+ api calls? Please help.

casag...@back4app.com

unread,
Jun 6, 2017, 9:10:32 AM6/6/17
to back{4}app, mrin...@gmail.com
Hello!

Yes, it will count as 1 API Call. Also, using saveAllInBackground() is a very useful way of controlling your requests and we suggest using it whenever possible.

Best!

mrin...@gmail.com

unread,
Jun 15, 2017, 5:06:51 PM6/15/17
to Back4App, mrin...@gmail.com
I tried to save 10 objects in a single saveAllInBackground() but instead of counting them as 1, it counted 10 api calls. Can you please check regarding the matter? Thank you.

casag...@back4app.com

unread,
Jun 16, 2017, 10:03:20 AM6/16/17
to Back4App, mrin...@gmail.com
Hello,

Please send your appId to comm...@back4app.com for us to analyze.

Best!

mrin...@gmail.com

unread,
Jun 16, 2017, 2:27:28 PM6/16/17
to Back4App, mrin...@gmail.com
I have mailed the app Id. Please check. Thank you.
Reply all
Reply to author
Forward
0 new messages