![]() |
VOOZH | about |
dotnet add package Sundial --version 2.242.0
NuGet\Install-Package Sundial -Version 2.242.0
<PackageReference Include="Sundial" Version="2.242.0" />
<PackageVersion Include="Sundial" Version="2.242.0" />Directory.Packages.props
<PackageReference Include="Sundial" />Project file
paket add Sundial --version 2.242.0
#r "nuget: Sundial, 2.242.0"
#:package Sundial@2.242.0
#addin nuget:?package=Sundial&version=2.242.0Install as a Cake Addin
#tool nuget:?package=Sundial&version=2.242.0Install as a Cake Tool
👁 license
👁 nuget
👁 dotNET China
.NET 功能齐全的开源分布式作业调度系统,可从最小的应用程序到大型企业系统使用。
dotnet add package Sundial
我们在主页上有不少例子,这是让您入门的第一个:
IJob 接口:public class MyJob : IJob
{
private readonly ILogger<MyJob> _logger;
public MyJob(ILogger<MyJob> logger)
{
_logger = logger;
}
public Task ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken)
{
_logger.LogInformation(context.ToString());
return Task.CompletedTask;
}
}
Startup.cs 注册 AddSchedule 服务和作业:services.AddSchedule(options =>
{
options.AddJob<MyJob>(Triggers.PeriodSeconds(5)); // 5s 执行一次
});
info: 2022-12-05 19:32:56.3835407 +08:00 星期一 L System.Logging.ScheduleService[0] #1
Schedule hosted service is running.
info: 2022-12-05 19:32:56.3913451 +08:00 星期一 L System.Logging.ScheduleService[0] #1
Schedule hosted service is preloading...
info: 2022-12-05 19:32:56.4322887 +08:00 星期一 L System.Logging.ScheduleService[0] #1
The <job1_trigger1> trigger for scheduler of <job1> successfully appended to the schedule.
info: 2022-12-05 19:32:56.4347959 +08:00 星期一 L System.Logging.ScheduleService[0] #1
The scheduler of <job1> successfully appended to the schedule.
warn: 2022-12-05 19:32:56.4504555 +08:00 星期一 L System.Logging.ScheduleService[0] #1
Schedule hosted service preload completed, and a total of <1> schedulers are appended.
info: 2022-12-05 19:33:01.5100177 +08:00 星期一 L MyJob[0] #13
+ <job1> [C] <job1 job1_trigger1> 5s 1ts 2022-12-05 19:33:01.395 -> 2022-12-05 19:33:06.428
info: 2022-12-05 19:33:06.4676792 +08:00 星期一 L MyJob[0] #13
+ <job1> [C] <job1 job1_trigger1> 5s 2ts 2022-12-05 19:33:06.428 -> 2022-12-05 19:33:11.435
info: 2022-12-05 19:33:11.4460946 +08:00 星期一 L MyJob[0] #16
+ <job1> [C] <job1 job1_trigger1> 5s 3ts 2022-12-05 19:33:11.435 -> 2022-12-05 19:33:16.412
JobExecutionContext 重写了 ToString() 方法并提供以下几种格式:
# 持续运行格式
<作业Id> 作业描述 [并行C/串行S] <作业Id 触发器Id> 触发器字符串 触发器描述 触发次数ts 触发时间 -> 下一次触发时间
# 触发停止格式
<作业Id> 作业描述 [并行C/串行S] <作业Id 触发器Id> 触发器字符串 触发器描述 触发次数ts 触发时间 [触发器终止状态]
您可以在主页找到 Sundial 文档。
该存储库的主要目的是继续发展 Sundial 核心,使其更快、更易于使用。Sundial 的开发在 Gitee 上公开进行,我们感谢社区贡献错误修复和改进。
Sundial 采用 开源许可证。
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 2 NuGet packages that depend on Sundial:
| Package | Downloads |
|---|---|
|
Sundial.Dashboard
Sundial Dashboard 看板 |
|
|
YF.WL.Logger
日志 |
Showing the top 2 popular GitHub repositories that depend on Sundial:
| Repository | Stars |
|---|---|
|
YSGStudyHards/DotNetExercises
⚔【DotNetGuide专栏C#/.NET/.NET Core编程技巧练习集】C#/.NET/.NET Core编程常用语法、算法、技巧、中间件、类库、工作业务实操练习集,配套详细的文章教程和代码示例,助力快速掌握C#/.NET/.NET Core中各种编程常用语法、算法、技巧、中间件、类库、工作业务实操等等。
|
|
|
liuhll/silky
The Silky framework is designed to help developers quickly build a microservice development framework through simple code and configuration under the .net platform.
|
| Version | Downloads | Last Updated |
|---|---|---|
| 2.242.0 | 0 | 6/18/2026 |
| 2.241.0 | 0 | 6/18/2026 |
| 2.240.0 | 117 | 6/9/2026 |
| 2.239.0 | 110 | 6/5/2026 |
| 2.238.0 | 119 | 6/4/2026 |
| 2.237.0 | 126 | 5/26/2026 |
| 2.236.0 | 120 | 5/22/2026 |
| 2.235.0 | 132 | 5/21/2026 |
| 2.234.0 | 112 | 5/19/2026 |
| 2.233.0 | 119 | 5/19/2026 |
| 2.232.0 | 111 | 5/19/2026 |
| 2.231.0 | 115 | 5/18/2026 |
| 2.230.0 | 114 | 5/18/2026 |
| 2.228.0 | 71 | 5/17/2026 |
| 2.227.0 | 66 | 5/16/2026 |
| 2.226.0 | 75 | 5/16/2026 |
| 2.225.0 | 75 | 5/15/2026 |
| 2.224.0 | 72 | 5/13/2026 |
| 2.223.0 | 75 | 5/12/2026 |
| 2.222.0 | 72 | 5/7/2026 |