Forums

Question regarding scheduled task run time

After reading about my issue in the forum for a bit I found some conflicting/missing information that I would like cleared up before purchasing a subscription.

Here is the error for my script: Completed task, took 7390.08 seconds, return code was 137.

From my understand according to this post: https://www.pythonanywhere.com/forums/topic/7535/, from 2016, error code 137 means the program can be killed if it exceeds the ram usage limit(3 GB I believe) OR if it exceeds the runtime allowed for a scheduled task corresponding to a free or paid account.

From what I have read, from both the post above, and other newer ones regarding the same issue, the maximum time for a free account seems to be 2 hours, and a paid account is 12, but there are many conflicting answers, even just in the post above.

What I would like cleared up is, 1)if error 137 can indeed be caused by going over the allowed runtime(not just ram limit being reached), which I believe it is, as when I run the script scheduled for under 2 hours it works just fine, and 2) what the exact limits are regarding scheduled tasks runtime.

Thank you!

2 hours is the limit for free accounts. In case of RAM limit, you would get an email (if your email address is confirmed)

Thank you for the response. Can you confirm the limit for paid accounts?

Sorry, that would have been a useful thing to post in our initial response, wouldn't it! It's 12 hours for paid accounts. BTW if your script is meant to run 24/7, then with a paid account, you might want to look into always-on tasks.

Thank you very much!

Yeah, sorry for the omission in the first answer.