Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AndroThink.WebJob.Core Nuget

Library that help in configuring new dot net core web job project

How to use

In Your Control

var job = CoreWebJob.Create("appsettings.json", true)
    .ConfigureWebJobs(options =>
    {

    }).ConfigureLogging((context, logging) =>
    {
        logging.AddConsole();
        logging.SetMinimumLevel(LogLevel.Trace);
    })
    .ConfigureServices((context, services) =>
    {
        services.AddSingleton<IMailSender,MailSender>();

        services.AddHostedService<TestService>(); // this inherites from BaseHostedService OR BaseBackgroundService
    })
    .WithFileLogger("Logs");

await job.RunAsync((sender, args) =>
{
    Exception ex = (Exception)args.ExceptionObject;

    Console.WriteLine("Webjob exception ==> " + ex.ToString());
});

About

Library that help in configuring new dot net core web job project

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages