Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,15 @@ public class CrontabSettings
public CrontabBaseSetting EventSubscriber { get; set; } = new();
public CrontabBaseSetting Watcher { get; set; } = new();
public string LockName { get; set; } = "CrontabWatcher:locker";
public DebugSetting Debug { get; set; } = new();
}

public class CrontabBaseSetting
{
public bool Enabled { get; set; } = true;
}

public class DebugSetting
{
public string AllowRuleTrigger { get; set; } = "";
}
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,10 @@ private async Task RunCronChecker(IServiceProvider services)
_logger.LogInformation($"The current time matches the cron expression {item}");

#if DEBUG
await HandleCrontabEvent(item);
if (item.Title == settings.Debug.AllowRuleTrigger)
{
await HandleCrontabEvent(item);
}
#else
if (publisher != null)
{
Expand Down
Loading