fix: 任务管理演示 Cron 表达式错误

This commit is contained in:
Argo Zhang 2020-03-04 15:02:59 +08:00
parent 5c3aaea05d
commit 452b89e239
No known key found for this signature in database
GPG Key ID: 152E398953DDF19F
3 changed files with 3 additions and 3 deletions

View File

@ -68,7 +68,6 @@ namespace Bootstrap.Admin.Controllers.Api
// 此处未存储到数据库中,直接送入任务中心
TaskServicesManager.Remove(widget.Name);
var expression = Longbow.Tasks.Cron.ParseCronExpression(widget.CronExpression);
TaskServicesManager.GetOrAdd(widget.Name, token => taskExecutor.Execute(token), TriggerBuilder.Build(widget.CronExpression));
return true;
}

View File

@ -24,7 +24,8 @@ namespace Bootstrap.Admin.Models
TaskTriggers = new Dictionary<string, string>
{
{ "每 5 秒钟执行一次", Longbow.Tasks.Cron.Secondly(5) },
{ "每 1 分钟执行一次", Longbow.Tasks.Cron.Minutely(1) }
{ "每 1 分钟执行一次", Longbow.Tasks.Cron.Minutely(1) },
{ "每 5 分钟执行一次", Longbow.Tasks.Cron.Minutely(5) }
};
}

View File

@ -16,7 +16,7 @@
<PackageReference Include="Longbow.OAuth" Version="3.1.1" />
<PackageReference Include="Longbow.PetaPoco" Version="1.0.2" />
<PackageReference Include="Longbow.Security.Cryptography" Version="1.3.0" />
<PackageReference Include="Longbow.Tasks" Version="3.1.0" />
<PackageReference Include="Longbow.Tasks" Version="3.1.1" />
<PackageReference Include="Longbow.TencentAuth" Version="3.1.1" />
<PackageReference Include="Longbow.Web" Version="3.1.1" />
<PackageReference Include="Longbow.WeChatAuth" Version="3.1.2" />