Iqduke.ServicePlatform 1.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Iqduke.ServicePlatform --version 1.0.1                
NuGet\Install-Package Iqduke.ServicePlatform -Version 1.0.1                
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="Iqduke.ServicePlatform" Version="1.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Iqduke.ServicePlatform --version 1.0.1                
#r "nuget: Iqduke.ServicePlatform, 1.0.1"                
#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 Iqduke.ServicePlatform as a Cake Addin
#addin nuget:?package=Iqduke.ServicePlatform&version=1.0.1

// Install Iqduke.ServicePlatform as a Cake Tool
#tool nuget:?package=Iqduke.ServicePlatform&version=1.0.1                

Work Service 定时服务

NuGet\Install-Package Microsoft.Extensions.Hosting.WindowsServices -Version 8.0.0
NuGet\Install-Package Microsoft.Extensions.Hosting.Systemd -Version 8.0.0
using ServicePlatform.Test;

var builder = Host.CreateApplicationBuilder(args);
builder.Services.AddWindowsService(p =>
{
    p.ServiceName = "iqduke service platform";
});
builder.Services.AddSystemd();
builder.Services.AddHostedService<Worker>();

var host = builder.Build();

host.Run();
namespace ServicePlatform.Test;
public class Worker : TimerScheduledService
{
    private readonly ILogger<Worker> _logger;

    public Worker(ILogger<Worker> logger) : base(logger, TimeSpan.FromSeconds(1), DateTime.Now.AddSeconds(5) )
    {
        _logger = logger;
    }

    protected override Task ExecuteInternal(CancellationToken stoppingToken)
    {
        _logger.LogInformation("Worker running at: {time}", DateTimeOffset.Now);
        return Task.CompletedTask;
    }
}
https://learn.microsoft.com/en-us/dotnet/core/extensions/windows-service
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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
1.0.2 144 1/9/2024
1.0.1 91 1/9/2024
1.0.0 94 1/9/2024