Hello,
I’m trying to call run.daily for data from following list (taken from apps.yaml):
{'day': '10:00', 'morning': '7:00', 'night': '22:30', 'evening': '18:15'}
using interation:
def initialize(self):
for hour in self.args['timeofday']:
time_list = str(self.args['timeofday'][hour]).split(':')
runtime = datetime.time(int(time_list[0]),int(time_list[1]),0)
self.run_daily(self.run_daily_c, runtime)
def run_daily_c(self):
self.log("RUNDAILY: ")
It works however I need to pass “timeofday” to the calls.
Is there a chance to pass elements of my list to particular run_daily_c calls?
Something like (it doesn’t work of course):
def initialize(self):
self.run_daily(self.run_daily_c, runtime, hour)
def run_daily_c(self, hour):
self.log("RUNDAILY: " + hour)
?
Greetings, M