Luke 1.0.2

Scheduler job infrastructure to load and run assemblies

Install-Package Luke -Version 1.0.2
dotnet add package Luke --version 1.0.2
<PackageReference Include="Luke" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Luke --version 1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Luke

MainJob

Your main job is to check a json file and to import the scheduler jobs implementing LukeJob abstract class into your AppDomain and run them.

Your main project must reference Quartz and implement it as following

public class MainJob : IJob
{
        public async Task Execute(IJobExecutionContext context)
        {
            try
            {
                ILukeBuilder lukeBuilder = DependencyFactory.Instance.Resolve<ILukeBuilder>();
                ILukeExecutor lukeExecutor = DependencyFactory.Instance.Resolve<ILukeExecutor>();

                string path = Path.GetFullPath(Path.Combine(Directory.GetCurrentDirectory(), "LukePkg.json"));

                IEnumerable<LukeLocationModel> lukeLocationModels = await lukeBuilder.BuildAsync(path);
                await lukeExecutor.ExecuteAsync(lukeLocationModels);
            }
            catch (System.Exception ex)
            {
                System.Console.WriteLine(ex);
                throw;
            }
      }
}

Here you can use an IOC container or you can create the instances. It depends on you.

Json File

Your main project must have a json file and it must be an array having AssemblyName and AssemblyLocation tags. You can name it as "LukePkg.json"

[
  {
    "AssemblyName": "Luke.SampleJob.dll",
    "AssemblyLocation": "C:/Users/AkseArzuman/Desktop/Github/luke/sample/Luke.SampleJob/bin/Release/netstandard2.0/publish"
  }
]

Scheduler Job

Your scheduler job must implement LukeJob. If you are using a IOC container you must register your dependencies in RegisterDependencies method.

Please see : https://github.com/akselarzuman/luke/tree/master/sample

Luke

MainJob

Your main job is to check a json file and to import the scheduler jobs implementing LukeJob abstract class into your AppDomain and run them.

Your main project must reference Quartz and implement it as following

public class MainJob : IJob
{
        public async Task Execute(IJobExecutionContext context)
        {
            try
            {
                ILukeBuilder lukeBuilder = DependencyFactory.Instance.Resolve<ILukeBuilder>();
                ILukeExecutor lukeExecutor = DependencyFactory.Instance.Resolve<ILukeExecutor>();

                string path = Path.GetFullPath(Path.Combine(Directory.GetCurrentDirectory(), "LukePkg.json"));

                IEnumerable<LukeLocationModel> lukeLocationModels = await lukeBuilder.BuildAsync(path);
                await lukeExecutor.ExecuteAsync(lukeLocationModels);
            }
            catch (System.Exception ex)
            {
                System.Console.WriteLine(ex);
                throw;
            }
      }
}

Here you can use an IOC container or you can create the instances. It depends on you.

Json File

Your main project must have a json file and it must be an array having AssemblyName and AssemblyLocation tags. You can name it as "LukePkg.json"

[
  {
    "AssemblyName": "Luke.SampleJob.dll",
    "AssemblyLocation": "C:/Users/AkseArzuman/Desktop/Github/luke/sample/Luke.SampleJob/bin/Release/netstandard2.0/publish"
  }
]

Scheduler Job

Your scheduler job must implement LukeJob. If you are using a IOC container you must register your dependencies in RegisterDependencies method.

Please see : https://github.com/akselarzuman/luke/tree/master/sample

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.2 219 6/1/2018