Hello, I am relatively new to python. I am using systemd to run a python script i have called scheduler.py. If a switch status is set to 1 then a second script relay_test6.py should run using exec(open....read). I have checked the status of the scheduler which shows that it is running and that the task in hand is to run scheduler.py Please see screenshot. However, the second script, relay_test6.py is not initiated.
If I open Thonny and run scheduler.py then relay_test6.py is initiated and runs successfully. What am i doing wrong?
Code:
if status == '1': print("Job Executing level 1!") exec(open("/var/www/html/relay_test6.py").read())Statistics: Posted by Julian62 — Fri Jul 25, 2025 9:13 pm







