azure-webjobssdk

with azure webjobs how do i pass parameter for a scheduled task

≯℡__Kan透↙ 提交于 2019-12-04 18:03:53
问题 I am creating a dot net console app that will run as an Azure webjob. It is scheduled to run once an hour. I am wondering how I pass a parameter to the job when it is invoked? 回答1: Scheduled WebJobs are actually 2 separate resources: Triggered WebJob Azure Scheduler Job To pass parameters to the WebJob you need to go to the scheduled job (in the management portal) and update the url that is used to invoke the triggered WebJob. The REST API is described here: https://github.com/projectkudu

Disable a Triggered Azure WebJob

我的未来我决定 提交于 2019-12-04 14:51:27
I've got a webhook-triggered Azure WebJob. For... reasons, I do not have control over the system that is sending the webhooks. One webhook per day is sent. It is the only WebJob hosted by the WebApp. During testing I wanted to disable this WebJob, so I stopped the WebApp. Much to my surprise, the WebJob ran even though the WebApp was disabled. So my question is two-fold: Is the ability to trigger a WebJob while a WebApp is disabled intentional, or did I encounter some sort of bug? If this is intentional, is there a way to disable this job being triggered via the Azure portal? If the only

Service Bus message abandoned despite WebJobs SDK handler completed successfully

你离开我真会死。 提交于 2019-12-04 13:10:56
I have implemented a long running process as a WebJob using the WebJobs SDK. The long running process is awaited because I want the result. public async Task ProcessMessage([ServiceBusTrigger("queuename")] MyMessage message) { await Run(message.SomeProperty); // takes several minutes // I want to do something with the result here later.. } What I can't figure out is why the message sometimes is abandoned which of course triggers the handler again. I've tried to debug (locally), setting breakpoints before ProcessMessage finishes and I can see that it appears to finish successfully. The Sevice

Multiple Jobs Deployment in Visual Studio Team Services

霸气de小男生 提交于 2019-12-04 05:13:39
问题 I have a VS solution with multiple projects, each project is an independent WebJob which I am hosting in a Single AppServices. I am trying to automate this to Continuous deployment.What would be the best strategy to deploy only job in the solution which is changed? Is there a way to find out the project which is changed as part of the merge to CI? We are using git and this solution is in a single repository. We are using azure-webjobsdk for the projects. 回答1: You can follow below steps to

Update (re-deploy) existing azure webjob

ぐ巨炮叔叔 提交于 2019-12-03 22:19:00
I created an on-demand webjob. In the management portal there is no option to upload a new zip, to update it. I can delete the existing webjob and create a new one, but I would like to keep my logs. Is there any way to re-deploy it, overriding the old version, maintaining the logs? lopezbertoni You can connect to the website where the webjob is at via FTP and update the necessary files without erasing your log files. You can get the credentials to connect via FTP from the Publish Profile. You can also use your website's debug console at: https://yoursitename.scm.azurewebsites.net/DebugConsole

Communication between a WebJob and SignalR Hub

人盡茶涼 提交于 2019-12-03 12:56:49
I have the following scenario: I have an azure webjob (used to send mails) and I need to check the progress of the webjob in my web application. I am using SignalR to communicate with clients from my server. When I want to send an email, I push a message in the queue and the azure webjob does his job. The question is, how can I communicate the progress of the webjob to the client? Originally my idea was to push a message from the webjob, so the Hub could read it from the queue. Then, I would notify clients from the hub. However, I am not able to find a way to communicate the webjob and the hub

Stuck when publishing Web App to Azure with WebJob

╄→гoц情女王★ 提交于 2019-12-03 12:45:44
I just used the WebJob SDK to add a WebJob to my web app. Now, when publishing the web app, VS is stuck when publishing (does not hang, but does not progress either). I know it's caused by the WebJob because when I remove the webjobs-list.json , it publishes perfectly. Weird thing is, publishing the WebJob alone (using Publish as Azure WebJob ) does not present this problem. Using .NET Framework 4.5.1 if it matters. Update: 4.5 did not make a difference. Here's an image of the problem: Setting the "maximum number of parallel project builds" to 1 (default is 4) solved the problem for me. It is

Azure Webjob TextWriter logger being disposed in the middle of my method

我怕爱的太早我们不能终老 提交于 2019-12-03 12:29:07
I'm using a Webjob with the Windows Azure Storage SDK. When a new item shows up in a Queue, a method in my class is invoked. According to the SDK docs , if I take a TextWriter as a parameter to my method, the SDK will provide me with a TextWriter that I can write to which will show up in the Webjob's logging infrastructure. This makes it pretty easy to diagnose issues and troubleshoot things. public async static void ProcessQueueMessage([QueueTrigger("queueName")]MyModelType model, TextWriter logger) { await logger.WriteLineAsync(string.Format("Processing Item {0}", model.SasUrl)); // Some

AzureWebJobsDashboard Configuration Error

佐手、 提交于 2019-12-03 04:24:54
I created a new Azure WebJob project in Visual Studio 2015 using .NET Framework 4.6. In the app.config, I set three connection strings: AzureWebJobsDashboard AzureWebJobsStorage MyDatabaseConnectionString The AzureWebJobsDashboard and AzureWebJobsStorage connection strings are identical and they're both pointing to my storage account. I'm including one of the connection strings -- since they're both identical, except the "name". <add name="AzureWebJobsDashboard" connectionString="DefaultEndpointsProtocol=https;AccountName=mystorageaccountname;AccountKey

No parameterless constructor error in WebJobs with .NET Core and Ninject

孤人 提交于 2019-12-02 11:36:16
I'm trying to do a bit of a balancing act here. Currently Azure WebJobs don't support .NET Core. With some help, I created a .NET Core Console App and made it work as a WebJob. On top of that I'm trying to implement Ninject for DI. Code compiles fine but when I run it, I'm getting the "No parameterless constructor is defined for this object." error -- see below. I may be in a bit of unchartered territory here with Azure WebJobs, .NET Core 2.0 and Ninject but any idea what may be causing this? BTW, I had the same exact code running as a WebJob targeting .NET Framework. I needed to migrate to