RoastedChicken 1 Posted July 18, 2025 Posted July 18, 2025 Hello, I'm working on a plugin and was creating a scheduled task to do a health check, however I dont want this task to be shown in the scheduled task. Here's an example of my scheduled task code: using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using MediaBrowser.Model.Logging; using MediaBrowser.Model.Tasks; namespace Emby.Example.Tasks { public class TestConnectionTask : IScheduledTask { private readonly ILogger _logger; public TestConnectionTask(ILogManager logManager) { _logger = logManager.GetLogger(GetType().Name); } public string Name => "Test Connection"; public string Key => "Test Connection"; public string Description => "Tests the connection"; public string Category => "Example App"; public bool IsHidden => true; public bool IsEnabled => true; public bool IsLogged => true; public async Task Execute(CancellationToken cancellationToken, IProgress<double> progress) { try { } catch (Exception ex) { _logger.ErrorException("Error during test", ex); throw; } } public IEnumerable<TaskTriggerInfo> GetDefaultTriggers() { return new TaskTriggerInfo[] { }; } } } I can still see the task in the scheduled task page.
Solution Luke 42077 Posted July 18, 2025 Solution Posted July 18, 2025 Hi, try also having it implement IConfigurableScheduledTask.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now