0

I am trying to run a local host server using laragon .I want to start a python program and keep it running(even after server restart) until my server shutdowns . Suppose i have a file test.py , I want to keep it running as soon as my server starts up .

I know it might work when used with PHP and calling that script using the browser. But i want to run it as soon as the server starts up as a python program.

3
  • Could be understanding this wrong, but I'd imagine the best way to do this might just be to write a bash script. Fire off your python script at the same time you bootup your server, keep it pinging the server at localhost and if there's no ping (the server has shut down) kill that same python script. Commented Oct 13, 2019 at 16:14
  • I am running it as a local host server in a windows environment . I was looking for some way to edit the configuration of Apache so that my script run along with the Apache during its startup. Commented Oct 14, 2019 at 18:07
  • stackoverflow.com/questions/14718865/… might be a good read, best of luck bud seems like it's a lot harder in windows Commented Oct 15, 2019 at 14:32

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.