01.05.2019, 18:27
Hello,
How can i make a button on my visualization that turn a spesific schedule on and off?
How can i make a button on my visualization that turn a spesific schedule on and off?
Schedule on/off
|
01.05.2019, 18:27
Hello,
How can i make a button on my visualization that turn a spesific schedule on and off?
01.05.2019, 19:47
Hi.
You can use this script to get your function. -- Enables / Disables schedulers name = 'Scheduler 1' active = event.getvalue() db:update('schedulers', { active = toboolean(active) }, { name = name }) clearschedulers() --------------end--------------------- --------------put this in common functions--------------------- function clearschedulers() local files = io.ls('/tmp') for _, file in ipairs(files) do if file:find('lm-scheduler-', 1, true) then os.remove('/tmp/' .. file) end end end ---------------------end-------------------------------------------
01.05.2019, 20:17
Thanks for your reply, I'm new to this scripting so where do i need to change the script to make it fit my Schedule name?
02.05.2019, 05:39
Change Scheduler 1 to your name.
03.05.2019, 05:27
|
« Next Oldest | Next Newest »
|