2

I have a pre-compiled Azure timer function deployed to a function app. In order to change the cron expression currently I need redeploy from Visual Studio.

Is there a webservice or something that I can use to programmatically change this without having to do a full redeploy?

Janusz Nowak
  • 2,595
  • 1
  • 17
  • 36

1 Answers1

4

You can put the cron expression to configuration. Use % in attribute parameter:

[TimerTrigger("%schedule%")] TimerInfo timer

And define the setting schedule in your App settings (or in local.settings.json for local development).

Mikhail Shilkov
  • 34,128
  • 3
  • 68
  • 107
  • Hi Mikhail, thanks for the useful information - it will prevent having to redeploy from VS. Editing the App Settings still requires a manual intervention though, any idea about being able to programatically change it? – Patrick McInerney Oct 10 '17 at 13:07
  • You should be able to do it via C# SDK or Powershell, see [this question](https://stackoverflow.com/questions/23874503/change-azure-website-app-settings-from-code) for example – Mikhail Shilkov Oct 10 '17 at 13:11