forked from SciSharp/BotSharp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConversationLogCleanupRuleTrigger.cs
More file actions
26 lines (24 loc) · 982 Bytes
/
Copy pathConversationLogCleanupRuleTrigger.cs
File metadata and controls
26 lines (24 loc) · 982 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using BotSharp.Abstraction.Conversations.Enums;
using BotSharp.Abstraction.Crontab;
using BotSharp.Abstraction.Crontab.Models;
using BotSharp.Abstraction.Rules;
namespace BotSharp.OpenAPI.RuleTriggers
{
public class ConversationLogCleanupRuleTrigger : IRuleTrigger, ICrontabSource
{
public string Channel => ConversationChannel.Crontab;
public string Name => nameof(ConversationLogCleanupRuleTrigger);
public string EntityType { get; set; } = string.Empty;
public string EntityId { get; set; } = string.Empty;
public CrontabItem GetCrontabItem()
{
return new CrontabItem
{
Title = nameof(ConversationLogCleanupRuleTrigger),
Description = "Clean up old conversation logs daily",
Cron = "0 6 * * *", // Run at 6:00 AM UTC (Midnight Chicago Standard Time)
TriggerType = CronTabItemTriggerType.MessageQueue
};
}
}
}