Schedule domain on/off - hour/minutes/seconds

You can share your Lua Scripts with everybody here.
Post Reply
FrostyX
Posts: 10
Joined: Thu Apr 24, 2014 4:24 pm

Schedule domain on/off - hour/minutes/seconds

Post by FrostyX »

Hi guys! I'm fresh noob about this Lua Language thing. And want some help:)

Trying to execute script for automatic turning on/off everyday of mine domain but can't figure the right thing (my pc is in 24 h format) need exact time to seconds, but i'm falling all the way.

local nowHour = tonumber(os.date("%X"))

if nowHour == 7, 24, 33 (tried also with 7,24,33 or 7:24:33)
:(
c_StartDomain("MyDomain")
end

if nowHour == 13, 21, 11 then
c_StopDomain("MyDomain")
end

tried this also

local nowHour = print(os.date("%H,%M,%S"))

if nowHour == 13, 21, 11 then
c_StopDomain("MyDomain")
end

if nowHour == 13, 21, 11 then
c_StopDomain("MyDomain")
end


and some more but can't get it to work its all wrong.
Post Reply