From ddbed01cda81e6d6ea9dfd87870f1616e8e4817c Mon Sep 17 00:00:00 2001 From: Haiping Chen Date: Thu, 5 Dec 2024 18:09:33 -0600 Subject: [PATCH] fix naming of util-crontab-schedule_task --- .../BotSharp.Core.Crontab/Services/CrontabService.cs | 2 +- .../functions/util-crontab-schedule_task.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Infrastructure/BotSharp.Core.Crontab/Services/CrontabService.cs b/src/Infrastructure/BotSharp.Core.Crontab/Services/CrontabService.cs index ea91fd5b..d09f9260 100644 --- a/src/Infrastructure/BotSharp.Core.Crontab/Services/CrontabService.cs +++ b/src/Infrastructure/BotSharp.Core.Crontab/Services/CrontabService.cs @@ -60,7 +60,7 @@ public class CrontabService : ICrontabService { var convService = _services.GetRequiredService(); var conv = await convService.GetConversation("73a9ee27-d597-4739-958f-3bd79760ac8e"); - if (!conv.States.ContainsKey("cron_expression")) + if (conv == null || !conv.States.ContainsKey("cron_expression")) { return []; } diff --git a/src/Infrastructure/BotSharp.Core.Crontab/data/agents/6745151e-6d46-4a02-8de4-1c4f21c7da95/functions/util-crontab-schedule_task.json b/src/Infrastructure/BotSharp.Core.Crontab/data/agents/6745151e-6d46-4a02-8de4-1c4f21c7da95/functions/util-crontab-schedule_task.json index eba05ef4..4f866ce1 100644 --- a/src/Infrastructure/BotSharp.Core.Crontab/data/agents/6745151e-6d46-4a02-8de4-1c4f21c7da95/functions/util-crontab-schedule_task.json +++ b/src/Infrastructure/BotSharp.Core.Crontab/data/agents/6745151e-6d46-4a02-8de4-1c4f21c7da95/functions/util-crontab-schedule_task.json @@ -1,5 +1,5 @@ { - "name": "schedule_task", + "name": "util-crontab-schedule_task", "description": "Set up a scheduled task", "parameters": { "type": "object",