From 921180b5c413cf4e7463c29073abaefc69d66295 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Wed, 19 Feb 2020 15:32:35 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E5=86=85=E7=BD=AE=E4=BB=BB=E5=8A=A1=E4=BF=9D=E6=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/admin/Bootstrap.Admin/Controllers/Api/TasksController.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/admin/Bootstrap.Admin/Controllers/Api/TasksController.cs b/src/admin/Bootstrap.Admin/Controllers/Api/TasksController.cs index 8ba81bed..ccbbfc13 100644 --- a/src/admin/Bootstrap.Admin/Controllers/Api/TasksController.cs +++ b/src/admin/Bootstrap.Admin/Controllers/Api/TasksController.cs @@ -56,6 +56,7 @@ namespace Bootstrap.Admin.Controllers.Api { // 判断 Cron 表达式 if (string.IsNullOrEmpty(widget.CronExpression)) return false; + if (_tasks.Any(t => t.Equals(widget.Name, StringComparison.OrdinalIgnoreCase))) return false; // 加载任务执行体 // 此处可以扩展为任意 DLL 中的任意继承 ITask 接口的实体类