Can I run a Python program automatically off my computer?

Asked

Viewed 1,615 times

1

Good morning guys, I made a Python script that searches various websites for the occurrences of a few words and stores in SQL database. I would like to track the occurrence of these words over time, but I don’t want to keep clicking to run it or leave the computer turned on to keep running this routine. I would like for example that every 6 hours he would do this search and save the results. Can I get it running on some server? What would I need to learn to make this work? Thank you!

  • Look for crontab or cronjob. Some servers provide access to this task scheduling tool from Cpanel. It is also possible to do it via the command line if you have access via SSH.

  • Do you prefer the script to run full-time, and every 6 hours it runs the procedure? or you prefer it to be requested by an external agent?

  • @Joséhenriqueluckmann the idea is to run alone. Type of 12 in 12 hours.

1 answer

2


You can use a hosting service such as Pythonanywhere to run your script. In this service you can create a free account and create or upload your script. It is possible to run your script using a console in the browser or to schedule for periodic execution. You can also use a mysql database provided by the host. In the free account there are some limits of storage, internet access and CPU that your application can use, but it is possible that in your case should not exceed any of them.

Dashboard de acesso do pythonanywhere

  • This site is wonderful it works like a VPS, with 5 dollars you can already have a reasonable account that can do a lot of things.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.