SuperJobs.Core 6.4.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package SuperJobs.Core --version 6.4.0                
NuGet\Install-Package SuperJobs.Core -Version 6.4.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SuperJobs.Core" Version="6.4.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SuperJobs.Core --version 6.4.0                
#r "nuget: SuperJobs.Core, 6.4.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install SuperJobs.Core as a Cake Addin
#addin nuget:?package=SuperJobs.Core&version=6.4.0

// Install SuperJobs.Core as a Cake Tool
#tool nuget:?package=SuperJobs.Core&version=6.4.0                

具体的业务核心模块 SuperJobs.Core

当你扩展其它的Job模块时,除了引入Aicrosoft.Scheduling框架外,还可能要引入业务核心模块,以实现相关的业务。

动态加载插件式程序集Job的注意事项

  • 动态的Module模块必须要与SuperJobsAgent项目的引用包的版本一致,绝不可不同。切记!!!
  • 最简单的解决办法是在解决方案模式下的Nuget包管理合并选项卡中将冲突的版本Install为同一Version 。
  • 然后,打开生成的 proejct.deps.json搜索出错的Assemlby名字,看它是被谁引入的,解决它。
  • 特别是启动项目的 .deps.json。动态加载的其它项目里的程序集版本必须要与它相同。

TODO

  • 前置任务,某个任务的运行要依赖另一个任务的成功。

程序集Job例子

一个Job的例子


using Aicrosoft.Scheduler;
using Microsoft.Extensions.DependencyInjection;

namespace Aicrosoft.Jobs;

public class AppInsightsTelemetryJob : Job
{
    public AppInsightsTelemetryJob()
    {
        Timeout = 5;
        Trigger = "10000";
        WorkerType = this.GetTypeFullNameOf<AppInsightsTelemetryWorker>();
    }
}


public class AppInsightsTelemetryWorker : TimerWorker
{
    private readonly IAIMetricStartup startup;
    public AppInsightsTelemetryWorker(IServiceProvider serviceProvider) : base(serviceProvider)
    {
        startup = serviceProvider.GetRequiredService<IAIMetricStartup>();
    }

    public override TriggerStyle RequiredStyles => TriggerStyle.Startup;


    protected override async Task ExecuteAsync(CancellationToken cancellationToken)
    {
        //work load.
    }

}


public class AppInsightsTelemetryWorkerPoolProvider : WorkerPoolProvider<AppInsightsTelemetryWorker>, ITransient
{
    public AppInsightsTelemetryWorkerPoolProvider(IServiceProvider serviceProvider) : base(serviceProvider)
    {
    }
}


Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
8.5.0 74 10/12/2024
6.4.0 228 11/20/2023