Nowadays, .NET Core is a widely popular framework. It has characteristics such as cross-platform, consistent across architectures, command-line tools, flexible deployment, compatible, open source, and it's supported by Microsoft.
Worker Services is a new template introduced by .NET Core 3. Now, we will discuss how to implement a Scheduler job by combining the .NET Core 3 Worker Service and Coravel.
What is Worker Service ?
Worker Service performs background work like email sending, SMS sending, event broadcasting, triggering some data with a specific time, triggering salary calculation, etc. It is a type of light-weight console application.
Let's understand with one example.
Prerequisite
Download .NET Core 3 SDK (current version is 3.0.0 preview 6) from the official Microsoft site.

Create one empty folder
Run the command at this directory. Actually, it creates a sample console app with the use of worker template.
- dotnet new worker

Let's open the project in Visual Studio. The progam.cs file looks like below.
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Threading.Tasks;
- using Microsoft.Extensions.DependencyInjection;
- using Microsoft.Extensions.Hosting;
- namespace CoreWorkerServiceSchedularJob
- {
- public class Program
- {
- public static void Main(string[] args)
- {
- CreateHostBuilder(args).Build().Run();
- }
- public static IHostBuilder CreateHostBuilder(string[] args) =>
- Host.CreateDefaultBuilder(args)
- .ConfigureServices((hostContext, services) =>
- {
- services.AddHostedService<Worker>();
- });
- }
- }
How to Configure Coravel with this template
Run the following command with NuGet Package console.


HariPosted Jul 9, 2021, 2:21 AM
Will this coravel library work to invoke the job when file is placed on AWS or Virtual machine hard disk ?
Abdelrhman AbdoPosted Jan 7, 2021, 2:47 PM
'Method not found: 'System.Text.Json.JsonDocument System.Text.Json.JsonDocument.Parse(System