Script allowed to fire once a day?

I got a script exposed to Apple Homekit. Is it possible to just allow this script to fire for example every 12 hours? Looking for a simple solution, I am a beginner of Hassio. The actual script below…

- delay: 00:04:00
- service: vacuum.send_command
entity_id: vacuum.xiaomi_vacuum_cleaner
command: app_segment_clean
params: [20]

Add an input boolean in the mix so that when calling the script check that boolean is off. During the script set input boolean to true. Then have an automation to set the boolean back to off after set time period.

1 Like

To clarify, the script execution will stop if any set condition fails.