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.

Time dependent script
#2
I guess you need something like this in your script:

Code:
date = os.date('*t')
hour = date.hour

-- morning between 6:00 and 11::59
if 6 <= hour and hour <= 11 then
 domorningstuff()
-- other time
else
 dootherstuff()
end
Reply


Messages In This Thread
Time dependent script - by FatMax - 18.11.2015, 13:21
RE: Time dependent script - by admin - 19.11.2015, 07:23
RE: Time dependent script - by FatMax - 19.11.2015, 08:33
RE: Time dependent script - by FatMax - 14.01.2016, 13:18
RE: Time dependent script - by admin - 14.01.2016, 13:36
RE: Time dependent script - by FatMax - 14.01.2016, 13:39
RE: Time dependent script - by KoBra - 12.09.2023, 18:34
RE: Time dependent script - by admin - 13.09.2023, 07:44
RE: Time dependent script - by KoBra - 13.09.2023, 13:16
RE: Time dependent script - by admin - 13.09.2023, 14:16
RE: Time dependent script - by KoBra - 14.09.2023, 09:25

Forum Jump: