Schedule domain on/off - hour/minutes/seconds

You can share your Lua Scripts with everybody here.

Schedule domain on/off - hour/minutes/seconds

Postby FrostyX » Thu Apr 24, 2014 4:40 pm

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.
FrostyX
 
10
 
Thu Apr 24, 2014 4:24 pm

Return to Lua scripts

Who is online

Users browsing this forum: No registered users and 1 guest

cron