The Azure Webjobs SDK is a framework distributed as a Nuget package aimed at helping you define Functions that are run by Triggers and use Bindings to other Azure services (like Azure Storage and Service Bus) in a declarative fashion.
The SDK uses a JobHost to coordinate your coded Functions. In a tipical scenario, your Webjob is a Console Application that initializes the JobHost this way:
class Program
{
static void Main()
{
JobHostConfiguration config = new JobHostConfiguration();
config.StorageConnectionString = "Your_Azure_Storage_ConnectionString";
config.DashboardConnectionString = "Your_Azure_Storage_ConnectionString";
JobHost host = new JobHost(config);
host.RunAndBlock();
}
}
The JobHostConfiguration lets you personalize more settings for different triggers:
config.Queues.BatchSize = 8;
config.Queues.MaxDequeueCount = 4;
config.Queues.MaxPollingInterval = TimeSpan.FromSeconds(15);
config.JobActivator = new MyCustomJobActivator();