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.

Sort table and make schedule from script
#1
Hello there

I have a table looeking like this (but up to 40 lines):
local tbl = {
{month = 2, day = 13, hour = 9, price_raw = 0.12 , price_total= 0.42},
{month = 2, day = 13, hour = 10, price_raw = 0.22 , price_total= 0.49},
{month = 2, day = 13, hour = 11, price_raw = 0.23 , price_total= 0.43},
{month = 2, day = 13, hour = 12, price_raw = 0.11 , price_total= 0.44},
{month = 2, day = 13, hour = 13, price_raw = 0.13 , price_total= 0.48},
{month = 2, day = 13, hour = 14, price_raw = 0.19 , price_total= 0.38},
{month = 2, day = 13, hour = 15, price_raw = 0.14 , price_total= 0.41},
{month = 2, day = 13, hour = 16, price_raw = 0.16 , price_total= 0.28}
}

How do I sort the table after [price_total] ?

Now I want to make a Schedule, lets call them, Charge_ev_in_min

How do I edit a schedule from script? I need to do the following:
Set time and date for start
Set value (0-600)
Disable scheduler
Enable scheduler
delete schedule 

BR

Tue
Reply


Messages In This Thread
Sort table and make schedule from script - by Tue - 13.02.2022, 15:38

Forum Jump: