As suggested in this post https://www.domoticz.com/forum/viewtopi ... 59&t=31447, I have a dzvents scripts that kicks a bash script (os.execute) that will at a certain point in time trigger a custom event. Everything is working as expected. However, I'm under the impression that os.execute does not start in background. Am I right? I could very well kick the bash script using cron. However, for maintenability reasons, I prefer to have all in one place. So my question: is there a mean to kick os.execute asynchronously?
Lets put it put another way. Since the bash script is used because I need to send a cookie, is the cookie mechanism will be some day supported directly in dzvents (openURL)
Thank you
os.execute in background? [Solved]
Moderator: leecollings
-
Number8
- Posts: 374
- Joined: Friday 23 May 2014 7:55
- Target OS: Linux
- Domoticz version: 2022.1
- Location: Saint Pierre de Jards
- Contact:
os.execute in background?
Debian buster on NUC and three RPi with buster.
- heggink
- Posts: 989
- Joined: Tuesday 08 September 2015 21:44
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 12451
- Location: NL
- Contact:
Re: os.execute in background? [Solved]
By default, os.execute is a blocking call. Add an & at the end of the command line to run in background. I do that on all calls to prevent these 'seems to have ended' messages in the log.
Sent from phone.
Sent from phone.
Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
Who is online
Users browsing this forum: No registered users and 1 guest