Why is TimerTrigger not asking for storage account in basic WebJobs SDK v3 host app?WebJobs SDK - Omitting the AzureJobsDashboard connection stringIs the Azure WebJobs SDK specifically meant for working with Azure Storage?ServiceBusTrigger batch in Azure WebJob Sdk beta 0.5Can Azure WebJobs work with the non-classic storage accountsAzure subscription and webjob questionsDoes the Azure WebJobs SDK support pushing TextWriter logs into App Insights?Confused with regards to role of azure-webjobs-sdk-scriptNo job functions found in Azure WebjobsAzure C# Webjob TimeTrigger not firingBasic of Azure WebJobs SDK
Has there ever been an airliner design involving reducing generator load by installing solar panels?
Important Resources for Dark Age Civilizations?
Is it possible to run Internet Explorer on OS X El Capitan?
What's the point of deactivating Num Lock on login screens?
How does quantile regression compare to logistic regression with the variable split at the quantile?
meaning of に in 本当に?
Can a vampire attack twice with their claws using Multiattack?
Why doesn't Newton's third law mean a person bounces back to where they started when they hit the ground?
Watching something be written to a file live with tail
How can I prevent hyper evolved versions of regular creatures from wiping out their cousins?
RSA: Danger of using p to create q
What's the output of a record needle playing an out-of-speed record
Accidentally leaked the solution to an assignment, what to do now? (I'm the prof)
High voltage LED indicator 40-1000 VDC without additional power supply
Unable to deploy metadata from Partner Developer scratch org because of extra fields
Alternative to sending password over mail?
What does it mean to describe someone as a butt steak?
Approximately how much travel time was saved by the opening of the Suez Canal in 1869?
What are the disadvantages of having a left skewed distribution?
Java Casting: Java 11 throws LambdaConversionException while 1.8 does not
How to format long polynomial?
How can bays and straits be determined in a procedurally generated map?
Is it unprofessional to ask if a job posting on GlassDoor is real?
How to move a thin line with the black arrow in Illustrator?
Why is TimerTrigger not asking for storage account in basic WebJobs SDK v3 host app?
WebJobs SDK - Omitting the AzureJobsDashboard connection stringIs the Azure WebJobs SDK specifically meant for working with Azure Storage?ServiceBusTrigger batch in Azure WebJob Sdk beta 0.5Can Azure WebJobs work with the non-classic storage accountsAzure subscription and webjob questionsDoes the Azure WebJobs SDK support pushing TextWriter logs into App Insights?Confused with regards to role of azure-webjobs-sdk-scriptNo job functions found in Azure WebjobsAzure C# Webjob TimeTrigger not firingBasic of Azure WebJobs SDK
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I'm playing with WebJobs SDK v3.0.5, using a very simple .NET Core 2.2 Console project as follows:
TimerHost.csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.2</TargetFramework>
<LangVersion>7.1</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Azure.WebJobs" Version="3.0.5" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions" Version="3.0.2" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="2.2.0" />
</ItemGroup>
<ItemGroup>
<None Update="appsettings.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
Program.cs
using System.Threading.Tasks;
using Microsoft.Azure.WebJobs;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
namespace TimerHost
public class Program
public static async Task Main()
var builder = new HostBuilder();
var host = builder
.UseEnvironment("Development")
.ConfigureServices((context, services) =>
services.AddSingleton(context.Configuration);
)
.ConfigureWebJobs(webJobsBuilder =>
webJobsBuilder
.AddAzureStorageCoreServices()
.AddTimers();
)
.ConfigureLogging((context, b) =>
b.SetMinimumLevel(LogLevel.Debug);
b.AddConsole();
)
.UseConsoleLifetime()
.Build();
await host.RunAsync();
public static class Function
public static void Run([TimerTrigger("*/10 * * * * *")] TimerInfo timer, ILogger logger)
logger.LogInformation($"Running job for timer. Next 3 runs are: timer.FormatNextOccurrences(3)");
appsettings.json
The trigger runs fine. However, according to the latest docs (https://docs.microsoft.com/en-us/azure/app-service/webjobs-sdk-how-to#multiple-instances), the timer should run implicitly as a singleton, which means it should be using an Azure storage account for distributed locking support.
When using Azure Functions locally, I would expect to provide a setting like this:
"AzureWebJobsStorage": "UseDevelopmentStorage=true"
Otherwise I actually can't run a function, I get an error saying this setting is required, however in the Console host example, I don't get any error at all.
Can someone explain why the console host is not requiring the use of a default storage account? How is the timer maintaining singleton behavior in this scenario?
c#
add a comment |
I'm playing with WebJobs SDK v3.0.5, using a very simple .NET Core 2.2 Console project as follows:
TimerHost.csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.2</TargetFramework>
<LangVersion>7.1</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Azure.WebJobs" Version="3.0.5" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions" Version="3.0.2" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="2.2.0" />
</ItemGroup>
<ItemGroup>
<None Update="appsettings.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
Program.cs
using System.Threading.Tasks;
using Microsoft.Azure.WebJobs;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
namespace TimerHost
public class Program
public static async Task Main()
var builder = new HostBuilder();
var host = builder
.UseEnvironment("Development")
.ConfigureServices((context, services) =>
services.AddSingleton(context.Configuration);
)
.ConfigureWebJobs(webJobsBuilder =>
webJobsBuilder
.AddAzureStorageCoreServices()
.AddTimers();
)
.ConfigureLogging((context, b) =>
b.SetMinimumLevel(LogLevel.Debug);
b.AddConsole();
)
.UseConsoleLifetime()
.Build();
await host.RunAsync();
public static class Function
public static void Run([TimerTrigger("*/10 * * * * *")] TimerInfo timer, ILogger logger)
logger.LogInformation($"Running job for timer. Next 3 runs are: timer.FormatNextOccurrences(3)");
appsettings.json
The trigger runs fine. However, according to the latest docs (https://docs.microsoft.com/en-us/azure/app-service/webjobs-sdk-how-to#multiple-instances), the timer should run implicitly as a singleton, which means it should be using an Azure storage account for distributed locking support.
When using Azure Functions locally, I would expect to provide a setting like this:
"AzureWebJobsStorage": "UseDevelopmentStorage=true"
Otherwise I actually can't run a function, I get an error saying this setting is required, however in the Console host example, I don't get any error at all.
Can someone explain why the console host is not requiring the use of a default storage account? How is the timer maintaining singleton behavior in this scenario?
c#
add a comment |
I'm playing with WebJobs SDK v3.0.5, using a very simple .NET Core 2.2 Console project as follows:
TimerHost.csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.2</TargetFramework>
<LangVersion>7.1</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Azure.WebJobs" Version="3.0.5" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions" Version="3.0.2" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="2.2.0" />
</ItemGroup>
<ItemGroup>
<None Update="appsettings.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
Program.cs
using System.Threading.Tasks;
using Microsoft.Azure.WebJobs;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
namespace TimerHost
public class Program
public static async Task Main()
var builder = new HostBuilder();
var host = builder
.UseEnvironment("Development")
.ConfigureServices((context, services) =>
services.AddSingleton(context.Configuration);
)
.ConfigureWebJobs(webJobsBuilder =>
webJobsBuilder
.AddAzureStorageCoreServices()
.AddTimers();
)
.ConfigureLogging((context, b) =>
b.SetMinimumLevel(LogLevel.Debug);
b.AddConsole();
)
.UseConsoleLifetime()
.Build();
await host.RunAsync();
public static class Function
public static void Run([TimerTrigger("*/10 * * * * *")] TimerInfo timer, ILogger logger)
logger.LogInformation($"Running job for timer. Next 3 runs are: timer.FormatNextOccurrences(3)");
appsettings.json
The trigger runs fine. However, according to the latest docs (https://docs.microsoft.com/en-us/azure/app-service/webjobs-sdk-how-to#multiple-instances), the timer should run implicitly as a singleton, which means it should be using an Azure storage account for distributed locking support.
When using Azure Functions locally, I would expect to provide a setting like this:
"AzureWebJobsStorage": "UseDevelopmentStorage=true"
Otherwise I actually can't run a function, I get an error saying this setting is required, however in the Console host example, I don't get any error at all.
Can someone explain why the console host is not requiring the use of a default storage account? How is the timer maintaining singleton behavior in this scenario?
c#
I'm playing with WebJobs SDK v3.0.5, using a very simple .NET Core 2.2 Console project as follows:
TimerHost.csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.2</TargetFramework>
<LangVersion>7.1</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Azure.WebJobs" Version="3.0.5" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions" Version="3.0.2" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="2.2.0" />
</ItemGroup>
<ItemGroup>
<None Update="appsettings.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
Program.cs
using System.Threading.Tasks;
using Microsoft.Azure.WebJobs;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
namespace TimerHost
public class Program
public static async Task Main()
var builder = new HostBuilder();
var host = builder
.UseEnvironment("Development")
.ConfigureServices((context, services) =>
services.AddSingleton(context.Configuration);
)
.ConfigureWebJobs(webJobsBuilder =>
webJobsBuilder
.AddAzureStorageCoreServices()
.AddTimers();
)
.ConfigureLogging((context, b) =>
b.SetMinimumLevel(LogLevel.Debug);
b.AddConsole();
)
.UseConsoleLifetime()
.Build();
await host.RunAsync();
public static class Function
public static void Run([TimerTrigger("*/10 * * * * *")] TimerInfo timer, ILogger logger)
logger.LogInformation($"Running job for timer. Next 3 runs are: timer.FormatNextOccurrences(3)");
appsettings.json
The trigger runs fine. However, according to the latest docs (https://docs.microsoft.com/en-us/azure/app-service/webjobs-sdk-how-to#multiple-instances), the timer should run implicitly as a singleton, which means it should be using an Azure storage account for distributed locking support.
When using Azure Functions locally, I would expect to provide a setting like this:
"AzureWebJobsStorage": "UseDevelopmentStorage=true"
Otherwise I actually can't run a function, I get an error saying this setting is required, however in the Console host example, I don't get any error at all.
Can someone explain why the console host is not requiring the use of a default storage account? How is the timer maintaining singleton behavior in this scenario?
c#
c#
edited Mar 8 at 2:05
Sam
asked Mar 8 at 1:47
SamSam
5,0252329
5,0252329
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
I spent some time debugging the WebJobs SDK source code from my app, and found more information on what is happening under the hood:
If the AzureWebJobsStorage app setting is not defined in the configuration, then the SDK falls back to using an in-memory distributed lock manager for timer and singleton triggers. There is no logging associated with this fallback, and the default lock manager is suitable for local development only.
Azure Storage Emulator can be used instead by setting the connection string as you would for Azure Functions, just make sure you've re-built your project so that the appsettings.json files are propagated to the project output folder, this tripped me up for a bit.
No errors or log entries are emitted if the value of AzureWebJobsStorage is not a valid local or cloud-based storage account connection string - the configuration will just silently fall back to the in-memory lock manager instead.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55055586%2fwhy-is-timertrigger-not-asking-for-storage-account-in-basic-webjobs-sdk-v3-host%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I spent some time debugging the WebJobs SDK source code from my app, and found more information on what is happening under the hood:
If the AzureWebJobsStorage app setting is not defined in the configuration, then the SDK falls back to using an in-memory distributed lock manager for timer and singleton triggers. There is no logging associated with this fallback, and the default lock manager is suitable for local development only.
Azure Storage Emulator can be used instead by setting the connection string as you would for Azure Functions, just make sure you've re-built your project so that the appsettings.json files are propagated to the project output folder, this tripped me up for a bit.
No errors or log entries are emitted if the value of AzureWebJobsStorage is not a valid local or cloud-based storage account connection string - the configuration will just silently fall back to the in-memory lock manager instead.
add a comment |
I spent some time debugging the WebJobs SDK source code from my app, and found more information on what is happening under the hood:
If the AzureWebJobsStorage app setting is not defined in the configuration, then the SDK falls back to using an in-memory distributed lock manager for timer and singleton triggers. There is no logging associated with this fallback, and the default lock manager is suitable for local development only.
Azure Storage Emulator can be used instead by setting the connection string as you would for Azure Functions, just make sure you've re-built your project so that the appsettings.json files are propagated to the project output folder, this tripped me up for a bit.
No errors or log entries are emitted if the value of AzureWebJobsStorage is not a valid local or cloud-based storage account connection string - the configuration will just silently fall back to the in-memory lock manager instead.
add a comment |
I spent some time debugging the WebJobs SDK source code from my app, and found more information on what is happening under the hood:
If the AzureWebJobsStorage app setting is not defined in the configuration, then the SDK falls back to using an in-memory distributed lock manager for timer and singleton triggers. There is no logging associated with this fallback, and the default lock manager is suitable for local development only.
Azure Storage Emulator can be used instead by setting the connection string as you would for Azure Functions, just make sure you've re-built your project so that the appsettings.json files are propagated to the project output folder, this tripped me up for a bit.
No errors or log entries are emitted if the value of AzureWebJobsStorage is not a valid local or cloud-based storage account connection string - the configuration will just silently fall back to the in-memory lock manager instead.
I spent some time debugging the WebJobs SDK source code from my app, and found more information on what is happening under the hood:
If the AzureWebJobsStorage app setting is not defined in the configuration, then the SDK falls back to using an in-memory distributed lock manager for timer and singleton triggers. There is no logging associated with this fallback, and the default lock manager is suitable for local development only.
Azure Storage Emulator can be used instead by setting the connection string as you would for Azure Functions, just make sure you've re-built your project so that the appsettings.json files are propagated to the project output folder, this tripped me up for a bit.
No errors or log entries are emitted if the value of AzureWebJobsStorage is not a valid local or cloud-based storage account connection string - the configuration will just silently fall back to the in-memory lock manager instead.
answered Mar 11 at 3:24
SamSam
5,0252329
5,0252329
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55055586%2fwhy-is-timertrigger-not-asking-for-storage-account-in-basic-webjobs-sdk-v3-host%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown