The documentation is very clear - set RunOnStartup = false in production. (https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-timer?tabs=in-process&pivots=programming-language-csharp#example)
However, how do we do that without 'remembering' to change true to false in the code?
I can't see how to pass a config setting from appsettings.json like you can for the Cron String?
e.g.
public async Task DataRetentionAllTenantsAndAccounts([TimerTrigger("%App:DataRetentionAllTenantsAndAccountsCronTrigger%", RunOnStartup = true)] TimerInfo myTimer, ILogger log)
{
Console.WriteLine("Started DataRetentionAllTenantsAndAccounts");
log.LogInformation("Started DataRetentionAllTenantsAndAccounts");
await _mailMiloManager.DataRetentionAllTenantsAndAccountsAsync();
}