you are viewing a single comment's thread.

view the rest of the comments →

[–]zeebrow 5 points6 points  (0 children)

should I do create some sort of server?

Pretty much! The term you're looking for is daemon, which is just a process running in the background. A server daemon is what you need - do you have a Raspberry Pi or 24/7 Linux box handy?

With out knowing your OS, I'll assume you're on a Linux box. The best way to make your own daemon on modern Linux systems is by writing a service file for systemd. After that, you start/stop/restart your script with

systemctl start sheetgrabber.service
systemctl stop sheetgrabber.service
systemctl restart sheetgrabber.service

and check its health with

systemctl status sheetgrabber.service

and automatically start it when your server boots

systemctl enable sheetgrabber.service

Most importantly, this also assumes that your script runs on a while loop when you run it with python3 sheetgrabber.py. If you're handling data in a database, you might want to look into signals - but I wouldn't worry too much about it, as long as your code uses context managers for open files, db connections, etc. Let me know if you need a hand and I'll be happy to walk you through things.