fix: 任务管理演示 Cron 表达式错误
This commit is contained in:
parent
5c3aaea05d
commit
452b89e239
|
@ -68,7 +68,6 @@ namespace Bootstrap.Admin.Controllers.Api
|
||||||
|
|
||||||
// 此处未存储到数据库中,直接送入任务中心
|
// 此处未存储到数据库中,直接送入任务中心
|
||||||
TaskServicesManager.Remove(widget.Name);
|
TaskServicesManager.Remove(widget.Name);
|
||||||
var expression = Longbow.Tasks.Cron.ParseCronExpression(widget.CronExpression);
|
|
||||||
TaskServicesManager.GetOrAdd(widget.Name, token => taskExecutor.Execute(token), TriggerBuilder.Build(widget.CronExpression));
|
TaskServicesManager.GetOrAdd(widget.Name, token => taskExecutor.Execute(token), TriggerBuilder.Build(widget.CronExpression));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,8 @@ namespace Bootstrap.Admin.Models
|
||||||
TaskTriggers = new Dictionary<string, string>
|
TaskTriggers = new Dictionary<string, string>
|
||||||
{
|
{
|
||||||
{ "每 5 秒钟执行一次", Longbow.Tasks.Cron.Secondly(5) },
|
{ "每 5 秒钟执行一次", Longbow.Tasks.Cron.Secondly(5) },
|
||||||
{ "每 1 分钟执行一次", Longbow.Tasks.Cron.Minutely(1) }
|
{ "每 1 分钟执行一次", Longbow.Tasks.Cron.Minutely(1) },
|
||||||
|
{ "每 5 分钟执行一次", Longbow.Tasks.Cron.Minutely(5) }
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<PackageReference Include="Longbow.OAuth" Version="3.1.1" />
|
<PackageReference Include="Longbow.OAuth" Version="3.1.1" />
|
||||||
<PackageReference Include="Longbow.PetaPoco" Version="1.0.2" />
|
<PackageReference Include="Longbow.PetaPoco" Version="1.0.2" />
|
||||||
<PackageReference Include="Longbow.Security.Cryptography" Version="1.3.0" />
|
<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.TencentAuth" Version="3.1.1" />
|
||||||
<PackageReference Include="Longbow.Web" Version="3.1.1" />
|
<PackageReference Include="Longbow.Web" Version="3.1.1" />
|
||||||
<PackageReference Include="Longbow.WeChatAuth" Version="3.1.2" />
|
<PackageReference Include="Longbow.WeChatAuth" Version="3.1.2" />
|
||||||
|
|
Loading…
Reference in New Issue