I have a text file stored in a server which can be accessed by a user name and password. The text file is updated each 1 hour. I want to build a python program which can read the text file in every 1 hour using the user id and password. I will later use the text file to store the data in a MySQL server where it will use the data to show in an mobile app. But I need to figure out how to read data in every hour first.
CodePudding user response:
There are several ways to achieve this. You can set up a cron job on your server. An alternative is to expose an endpoint that you call from an external cron job service. I have used https://www.setcronjob.com/ on a couple of projects. Easy to setup and fairly cheap.
CodePudding user response:
If you want with python, there is also a library to do that https://pypi.org/project/python-crontab/ You need create the job in your server and implement the logic you want to do on your python script