I'm creating an Azure function. While testing on my localhost, I'd like it to execute immediately. But in Prod, it can run every 5 minutes. I'd like to not have to rely on humans to remember to make this change.
public static void Run([TimerTrigger("0 */5 * * * *", RunOnStartup = true)])
I've been playing around with various ways to make the true
here somehow variable, but have not found a solution. I was thinking something like:
public static void Run([TimerTrigger("0 */5 * * * *", RunOnStartup = #DEBUG ? true : false)])
But inline #DEBUG is not allowed.