You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

18 lines
481 B

using Microsoft.Extensions.DependencyInjection;
namespace Tiobon.Core.Extensions;
/// <summary>
/// 任务调度 启动服务
/// </summary>
public static class JobSetup_HostedService
{
public static void AddJobSetup_HostedService(this IServiceCollection services)
{
if (services == null) throw new ArgumentNullException(nameof(services));
services.AddHostedService<Job1TimedService>();
services.AddHostedService<Job2TimedService>();
}
}