Forums

Restart an Always On Task

Hello, I am a free user.

I am creating a Python script that restarts my always on task to update the dataframe that it uses.

Does anyone have any ideas that uses the pytonanywhere API?

I have tried using this link in the response part to restart the app, but I am not sure what the ID part refers to: 'https://www.pythonanywhere.com/api/v0/user/{username}/always_on/{id}/restart/'

If anyone has any ideas I would be really appreciative

Free accounts can't use always-on tasks.

On a paid account you will get ids of your tasks when you hit /api/v0/user/{username}/always_on/ endpoint with the GET.