Forums

User processes still guaranteed to run on the same machine?

Hi,

I'm running a long running task on my account, and I'm using the trick described in https://www.pythonanywhere.com/wiki/LongRunningTasks to automatically restart it in case it stops. It was mentioned in a thread back in 2012 that all processes from one user are guaranteed to run on the same computer, which is important for the trick to work, but is that still the case? If not, is there another way of having my tasks automatically restart if they shut down unexpectedly?

Sincerely, marjak93

I believe it's not the case, see for example the recent post: https://www.pythonanywhere.com/forums/topic/1312/#id_post_9123

There've been dioscussions here about other ways to do this, for example using MySQL locks, and also talk about a PA 'Utilities' library to make tasks like this easier..

HTH Jim

No, scheduled tasks are still guaranteed to run on the same server for each user. Consoles aren't, though.

Whoops - sorry guys. I hadn't appreciated this difference betwen console and scheduled tasks ;---(

np