|
Post by bishop on May 19, 2020 18:30:14 GMT
Hi, my script runs 24/7 (ideally). I want to run a few fuctions at a certain time of the day. For example, function A should run if the time is between 0:00 and 1:00 and function B should run if the time is between 22:00 and 23:00. Is there any easy way to achieve?
|
|
|
Post by AnkuLua on May 19, 2020 23:04:08 GMT
|
|
|
Post by donscoy on May 31, 2020 16:17:53 GMT
Hi, my script runs 24/7 (ideally). I want to run a few fuctions at a certain time of the day. function startgame() -- body end function doanything() -- body end local schedule = { ["00:00"] = startgame, ["02:50"] = doanything } while true do local c_time = os.date("%H:%M") if schedule[c_time] then schedule[c_time]() end wait(5) end
|
|