How to execute a long taking python script with flask

Viewed 14

I want to have a python script getting executed once a day. Since I'm running a Flask server on a Plesk instance I tried to use Scheduled Tasks to call a route every day.

The problem is that my script takes about 30 minutes to finish and the scheduled tasks times out after 3 minutes because there was no return.

The nginx server also times out after 3 minutes when calling the route manually.

So is there a way to run my python script scheduled without timing out? Plesk Scheduled Tasks can also execute a PHP command or a shell/bash script.

0 Answers
Related