Customized Scheduler + Saved Kavita+ Details (#2644)

This commit is contained in:
Joe Milazzo 2024-01-22 12:10:57 -06:00 committed by GitHub
parent 2092e120c3
commit ad74871623
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
76 changed files with 6076 additions and 3370 deletions

View file

@ -0,0 +1,22 @@
using System;
using Cronos;
namespace Kavita.Common.Helpers;
public static class CronHelper
{
public static bool IsValidCron(string cronExpression)
{
// NOTE: This must match Hangfire's underlying cron system. Hangfire is unique
try
{
CronExpression.Parse(cronExpression);
return true;
}
catch (Exception ex)
{
/* Swallow */
return false;
}
}
}