While calling the schedule function, i want to call the function in every 15 minutes.
Following is the code.
for i in (1 ,360, 15):
schedule_function(
run_strategy,
date_rules.every_day(),
time_rules.market_open(minutes= i))
def run_strategy(context, data):
print(get_datetime())
The output which is coming is only for 3 time stamps.
# Output
2021-09-08 09:15:59+00:00
2021-09-08 09:29:59+00:00
2021-09-08 15:14:59+00:00
Can anyone figure out where the fault is with the code?
Thanks in advance