Added option to immediately execute a task

This commit is contained in:
2023-05-19 19:20:44 +02:00
parent 312672a05c
commit 133b3146b5
2 changed files with 19 additions and 0 deletions

View File

@ -34,6 +34,15 @@ public class TaskManager
}
}
public void ExecuteTaskNow(TrangaTask task)
{
Task t = new Task(() =>
{
TaskExecutor.Execute(this.connectors, task, this._chapterCollection);
});
t.Start();
}
public void AddTask(TrangaTask.Task task, string connectorName, Publication? publication, TimeSpan reoccurrence,
string language = "")
{