I have a function app in python with two timer triggered functions. Each timer is set to be triggered every day however there are some days with no executions and no errors logged. I am on the flex consumption plan. What could be causing the timers to not be triggered?
This is the invocations tab:
Here is my main code:
app = func.FunctionApp()
# Timer trigger for the live environment at 13:10 UTC every day
@app.function_name(name="get_stripe_data_live")
@app.schedule(schedule="0 10 13 * * *", arg_name="mytimer", run_on_startup=False)
def get_stripe_data_live(mytimer: func.TimerRequest):
process_stripe_data(environment="live")
# Timer trigger for the sandbox environment at 13:20 UTC every day
@app.function_name(name="get_stripe_data_sandbox")
@app.schedule(schedule="0 20 14 * * *", arg_name="mytimer", run_on_startup=False)
def get_stripe_data_sandbox(mytimer: func.TimerRequest):
process_stripe_data(environment="sandbox")
# Main function for processing stripe data
def process_stripe_data(environment: str):
logging.info('Python function triggered')
# Set Stripe api key based on environment argument
if environment == 'live':
stripe.api_key = stripe_api_key_live
logging.info(f'Processing {environment} Stripe data')
elif environment == 'sandbox':
stripe.api_key = stripe_api_key_sandbox
logging.info(f'Processing {environment} Stripe data')
else:
logging.error(f'Unknown environment: {environment} Ending execution.')
return None
# Rest of code is here