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 that you accept these cookies being set.

Changing Schedule time via script for visulation page
#2
First, you need to get ID of each event you want to change:
Code:
log(db:getall('SELECT * FROM scheduler_events'))

Then you can use this function to change event time:
Code:
hour = 12 -- event time / start hour
min = 30 -- event time / minute
id = 42 -- event DB id

db:update('scheduler_events', {
  start_hour = hour,
  start_min = min
}, { id = id })

You can change active state of schedulers by name:
Code:
name = 'My scheduler'
active = 1 -- 1 = active, 0 = inactive
db:update('schedulers', { active = active }, { name = name })

After each change you need to clear schedulers cache:
http://forum.logicmachine.net/showthread...04#pid2804
Reply


Messages In This Thread
RE: Changing Schedule time via script for visulation page - by admin - 21.03.2017, 12:29

Forum Jump: