This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

Create/Delete scheduler with a script

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 in advance.
For now the only solution is to use DB queries. You can find some info here:

You will also need to call clearschedulers() after making any changes, see post #12 there for function code.
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 Smile

best regards

FW 2.4.0 is just released and should be already or comming soon on our website.

in this version we added enabling schedulers by object.


This sounds very interesting! I just installed FW 2.4.0 Smile

Do you have a quick example to do enabling/disabling in lua-script?
I do the same thing. I've primary and backup LM.
My code for enabling/disabling schedulers is here:
function _clearschedulers()
  local files ='/tmp')
  for _, file in ipairs(files) do
    if file:find('lm-scheduler-', 1, true) then
      os.remove('/tmp/' .. file)

function ecl_enable_all_schedulers(ai)
  -- ai must be 0 - inactivate 1 - activate
db:update('schedulers', {
    active = ai

LM5Lp, firmware: 2018.08.22, FlashSYS v2, ARMv7 Processor rev 5 (v7l), kernel 4.4.151

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)?
This only affects sunrise and sunset modes. Rollover cases are handled.

Forum Jump: