2019-01-13 20:02:23 +00:00
|
|
|
using System;
|
2018-12-27 23:27:57 +00:00
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Threading;
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
namespace MediaBrowser.Model.Tasks
|
|
|
|
{
|
|
|
|
/// <summary>
|
2020-04-05 16:10:56 +00:00
|
|
|
/// Interface IScheduledTaskWorker.
|
2018-12-27 23:27:57 +00:00
|
|
|
/// </summary>
|
|
|
|
public interface IScheduledTask
|
|
|
|
{
|
|
|
|
/// <summary>
|
2020-04-05 16:10:56 +00:00
|
|
|
/// Gets the name of the task.
|
2018-12-27 23:27:57 +00:00
|
|
|
/// </summary>
|
|
|
|
/// <value>The name.</value>
|
|
|
|
string Name { get; }
|
|
|
|
|
2020-04-05 16:10:56 +00:00
|
|
|
/// <summary>
|
|
|
|
/// Gets the key of the task.
|
|
|
|
/// </summary>
|
2018-12-27 23:27:57 +00:00
|
|
|
string Key { get; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the description.
|
|
|
|
/// </summary>
|
|
|
|
/// <value>The description.</value>
|
|
|
|
string Description { get; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the category.
|
|
|
|
/// </summary>
|
|
|
|
/// <value>The category.</value>
|
|
|
|
string Category { get; }
|
|
|
|
|
|
|
|
/// <summary>
|
2020-04-05 16:10:56 +00:00
|
|
|
/// Executes the task.
|
2018-12-27 23:27:57 +00:00
|
|
|
/// </summary>
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
/// <param name="progress">The progress.</param>
|
|
|
|
/// <returns>Task.</returns>
|
|
|
|
Task Execute(CancellationToken cancellationToken, IProgress<double> progress);
|
|
|
|
|
|
|
|
/// <summary>
|
2020-01-31 21:23:46 +00:00
|
|
|
/// Gets the default triggers that define when the task will run.
|
2018-12-27 23:27:57 +00:00
|
|
|
/// </summary>
|
2020-01-31 21:23:46 +00:00
|
|
|
/// <returns>The default triggers that define when the task will run.</returns>
|
2018-12-27 23:27:57 +00:00
|
|
|
IEnumerable<TaskTriggerInfo> GetDefaultTriggers();
|
|
|
|
}
|
|
|
|
}
|