Page 1 of 1

running python script automaticaly and update virtual sensor

Posted: Wednesday 11 September 2019 11:29
by dutchronnie
I want to run a python scrip automatic every 10 minutes. the script is updating a virtual sensor.
When i run the script everything is working fine.

I want to put it in a cron job, and dit the following.

Make the script executable
sudo contab -e
add a line
*/5 * * * * /home/pi/domoticz/scripts/trannergy.py

The job is executed, but it won't update the virtual sensor.

Is there an other way to make this work? without using a cron job?

Re: running python script automaticaly and update virtual sensor

Posted: Thursday 12 September 2019 7:45
by dutchronnie
after hours of trial and error, the cron job is working now.

*/5 * * * * python /home/pi/domoticz/scripts/trannergy.py