Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy Timer Trigger Function? #7

Closed
dfinke opened this issue Apr 23, 2017 · 5 comments
Closed

Deploy Timer Trigger Function? #7

dfinke opened this issue Apr 23, 2017 · 5 comments

Comments

@dfinke
Copy link

dfinke commented Apr 23, 2017

Do you have a function similar to the below for deploying timer triggers? I replaced the $props with a PS hashtable that defined the the Timer Trigger JSON. Then it failed on on the call to New-AzureRMResource.

https://github.com/davidebbo/AzureWebsitesSamples/blob/master/PowerShell/HelperFunctions.ps1#L367

@davidebbo
Copy link
Owner

Try simply changing the trigger to be a timer trigger. Exactly the same difference as what you see in functions.json in the two cases if you create functions from portal.

e.g. binding.json

  "bindings": [
    {
      "name": "myTimer",
      "type": "timerTrigger",
      "direction": "in",
      "schedule": "0 0 0 */3 * *"
    }
  ]

(just convert to PS syntax)

@dfinke
Copy link
Author

dfinke commented Apr 25, 2017

Thank you. Yeah, I tried that. The New-AzureRMResource threw an error. I'll try again.

@dfinke
Copy link
Author

dfinke commented Apr 25, 2017

Here is the error I get.

New-AzureRmResource : NotFound : System.IO.FileNotFoundException: Function (TimerTriggerPS) config does not exist or is invalid
   at Kudu.Core.Functions.FunctionManager.<GetFunctionConfigAsync>d__8.MoveNext()

@davidebbo
Copy link
Owner

And does the exact case I have in my sample file work for you?

@dfinke
Copy link
Author

dfinke commented Apr 25, 2017

Yes, that works. I'll keep digging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants