Enable/Disabling a Gateway Timer script via script

I have a button. When it's enabled I want the timer script to always execute (enable) but if the user press it again I want the script to not run (disable).

Our current solution is something like this:

#timer
active = system.tag.readBlocking(["path/timer_script_1"])  # bool tag
if active[0].value:
    # Do stuff
    print "Hello world!"

And the button toggles the tag.

Could I enable the script in its entirety?

Thanks in advance!

No. What you are doing is currently the recommended practice. (There will be more options in v8.3.)

1 Like

Thanks pturme l