Is it possible to create/delete a scheduler with defined parameters (name, controlled object, events with their starting times/values...) with a script? if so, how?
Thanks for Your answer. Yes, I'm already aware of the possibility of modifiying schedulers with DB queries. In future would be very nice to see ability to create/delete schedulers from a script.
I'm working on a "high availability" solution. Where I do have two spaceLynks (primary and secondary). When primary fails, secondary is activating his own scripts (script.categoryenable('HA_Category')) and is going to overtake the work. It works so far. The only problem is, that I cannot enable/disable schedulers by scripting.
My only Solution so far: Manualy deactivate/activate the schedulers on the UI => It's not a big deal because, it has only to be done when primary fails, which hopefully never happens.
But it would be great if I could do that also by scripting, without dealing with the db. IMHO this is "dangerous" because of possible incompatiblies with future FW-Releases.
I would realy appreciate a enable/disable function for schedulers, just like there is one for scripts
Hi
I do the same thing. I've primary and backup LM.
My code for enabling/disabling schedulers is here:
Code:
1234567891011121314151617
function_clearschedulers()
localfiles = io.ls('/tmp')
for_, fileinipairs(files) doiffile:find('lm-scheduler-', 1, true) thenos.remove('/tmp/' .. file)
endendendfunctionecl_enable_all_schedulers(ai)
-- ai must be 0 - inactivate 1 - activatedb:update('schedulers', {
active = ai
})
_clearschedulers()
end
LM5Lp, firmware: 2018.08.22 and 2021.12.15, FlashSYS v2, ARMv7 Processor rev 5 (v7l), kernel 4.4.151 and 4.4.259
02.08.2019, 14:52 (This post was last modified: 02.08.2019, 14:53 by equalizer.)
In the Schedule Events db entry what is the function of "offset_hour" "offset_min", do these advance and delay the timer? If so does it handle day rollover (if say off time is advanced beyond midnight)?