Yesterday, 06:33
Create a scheduled script that runs once every hour.
Use the following settings:
Minute: 0
Hour: *
Day of the month: *
Month of the year: Every month of the year
Day of the week: Every day of the week
Add your test sequence to the end of this script:
Use the following settings:
Minute: 0
Hour: *
Day of the month: *
Month of the year: Every month of the year
Day of the week: Every day of the week
Add your test sequence to the end of this script:
Code:
test_enabled = grp.getvalue('32/3/41')
test_freq = grp.getvalue('32/3/40')
if not test_enabled then
return
end
key = 'prev_test_time'
curr_time = os.time()
prev_time = storage.get(key, 0)
elapsed_hours = math.round((curr_time - prev_time) / 3600)
if elapsed_hours < test_freq then
return
end
storage.set(key, curr_time)
-- perform test sequence