Run Python on QNAP for Dummies

Don't miss a thing. Post your questions and discussion about other uncategorized NAS features here.
Post Reply
jcrau
First post
Posts: 1
Joined: Mon Jun 05, 2023 11:32 am

Run Python on QNAP for Dummies

Post by jcrau »

Hey Forum -
I am trying to get a python script to run at specific times on my always connected QNAP. The script scrapes a website for statistics and saves to a google drive as a .csv and .txt.

Currently - I have the script in a folder on my local machine and run it via Visual Studio Code manually. I am looking to automate the process by using my QNAP.

Prior to posting here for help, I have saved the folder containing the script to the QNAP and used ChatGPT to walk me through using Container Station (python:latest Docker) to address my knowledge gap - all to no avail! I get a "can't open file - no such file or directory" error message. I will admit to getting quite lost in the options and terminology of the settings when creating the new container!

I post in the hope that someone can direct me to, or can provide, a step-by-step, on each of the required settings etc, to get this working!!

Big thanks in advance to anyone who can assist.

Regards - John
diwiwi
Easy as a breeze
Posts: 400
Joined: Mon Apr 29, 2019 3:21 pm
Location: Paris, France

Re: Run Python on QNAP for Dummies

Post by diwiwi »

I may be wrong but I think that the NAS can run the python script directly. And if not, you may need to install Python qpkg from the App Center.
With that, you can edit the NAS crontab to add a line that run your script: https://wiki.qnap.com/wiki/Add_items_to_crontab

-
Post Reply

Return to “Miscellaneous”