Changed configuration of first run time for health check notifier from a time string to a cron expression.
This commit is contained in:
@@ -42,11 +42,11 @@ namespace Umbraco.Core.Configuration.Models.Validation
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool ValidateOptionalTime(string configPath, string value, out string message)
|
||||
public bool ValidateOptionalCronTab(string configPath, string value, out string message)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(value) && !value.IsValidTimeSpan())
|
||||
if (!string.IsNullOrEmpty(value) && !value.IsValidCronTab())
|
||||
{
|
||||
message = $"Configuration entry {configPath} contains an invalid time value.";
|
||||
message = $"Configuration entry {configPath} contains an invalid cron expression.";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace Umbraco.Core.Configuration.Models.Validation
|
||||
|
||||
private bool ValidateNotificationFirstRunTime(string value, out string message)
|
||||
{
|
||||
return ValidateOptionalTime($"{Constants.Configuration.ConfigHealthChecks}:{nameof(HealthChecksSettings.Notification)}:{nameof(HealthChecksSettings.Notification.FirstRunTime)}", value, out message);
|
||||
return ValidateOptionalCronTab($"{Constants.Configuration.ConfigHealthChecks}:{nameof(HealthChecksSettings.Notification)}:{nameof(HealthChecksSettings.Notification.FirstRunTime)}", value, out message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user