SolarOS 4.13.4 manual · api
Lua time and scheduling API
API overview · Python time and scheduling
solaros.time
solaros.time:uptime_ms,sleep_ms,uptime,datetime,utc_datetime,set_datetime,set_utc_datetime,utc_to_local,local_to_utc,is_valid,timezone,set_timezone,ntp_sync.sleep_msis cancellation-aware and accepts delays up to one hour.
solaros.rtc
solaros.rtc:status,set_alarm,clear_alarm,set_timer,clear_timer,pending, andack; constantsINTERRUPT_ALARMandINTERRUPT_TIMER. Direct slots are leased to Lua and released when the runtime exits.
solaros.schedule
solaros.schedule:list,add_in,add_every,add_at,add_daily,add_weekly,enable,remove,run, andstop_alarm; weekday bit constantsSUNthroughSAT. Actions are"alarm"or"run", with an absolute shell-script path for"run".
Quick reference
Use solaros.time, solaros.rtc, solaros.schedule for time and scheduling. See man lua for runtime conventions and service availability.