I have created a python script, Now I want to run that script in every hour. I can’t use Code node for that because my script is connected with other python scripts.
I want know about Execute Command node in n8n. I have hosted n8n locally.
If I use Execute Command node, where Do I need to host my python files?
How Can I my execution python code to execute my file.
Please someone help me with this.
n8n version: 1.42.1
Database (default: SQLite): SQLite
n8n EXECUTIONS_PROCESS setting (default: own, main): Own
Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
That’s a pretty interesting scenario you got there!
Given that you are using docker my first thought would be that you’d have to map the python directory to your docker container… But you might not have all the env options python needs to actually work and the modules path may be write protected as well… So you would probably be better off either using SSH to connect back to the host to run the Python or making a custom Dockerfile that includes python
But I am no docker expert
Once you got the docker config set up though you can then connect a Schedule Trigger Node to your Execute Command Node and this should at least work from n8n side.
You just have to get your docker shell connected to your python scripts outside of the container.