Skip to content
Jef King edited this page Jun 5, 2015 · 2 revisions

If you have a simple Web App or API App, then you can fire up a WebJob and have background tasks working on your web server (in Azure).

class Program
{
    static void Main()
    {
        var manager = new RoleTaskManager<object>(new Factory());
        manager.OnStart(config);
            
        var host = new JobHost();
        manager.Run();
            
        host.RunAndBlock();

        manager.OnStop();
    }
}
Clone this wiki locally