Skip to content

Releases: justdmitry/RecurrentTasks

v5: RunAsync and more

14 Feb 11:19
v5.0.0

Choose a tag to compare

  1. IRunnable changes
    1. void Run(...) changed to Task RunAsync(...) (from #1)
      Now it's easier to write async code (but inside it's still one Task from thread pool that wait your code for complete and sleep between runs, no magic here).
    2. IServiceProvider added as RunAsync parameter
      You should use it for obtaining scoped-lifetime objects in case you force you IRunnable be singleton (in AddTask, see below).
  2. Startup.cs changes
    1. You may change lifetime of your IRunnable when calling AddTask<>. It's Transient by default, but you may change it: services.AddTask<MyFirstTask>(ServiceLifetime.Singleton)
      Important! No matter what lifetime your IRunnable has - every RunAsync is called inside new/own scope (disposed after run). Use IServiceProvider passed as parameter for correct service resolution!
    2. You may pass CancellationToken to StartTask, and task will be stopped when this token got cancelled (issue #3)
  3. ITask changes
    1. Events BeforeRun, AfterRunSuccess and AfterRunFail replaced with async Func's - that's easier than async EventHandlers and EventArgs.

v4.0.0

23 Aug 16:04
v4.0.0

Choose a tag to compare

  • Breaking: IRunnable.Run changed from void Run(ITask currentTask) to void Run(ITask currentTask, CancellationToken cancellationToken). Long-running implementations may use this cancellationToken to check if Stop() was called on task.
  • Code coverage reports added (via codecov.io)

v3.2.0

07 Feb 22:16
v3.2.0

Choose a tag to compare

  • Projects converted to VS 2017 and *.csproj
  • Better logger name:
    • Old: RecurrentTasks.TaskRunner'1[[RecurrentTasks.Sample.SampleTask, RecurrentTasks.Sample, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]
    • New: RecurrentTasks.TaskRunner<RecurrentTasks.Sample.SampleTask>
  • NETStandard.Library (>= 1.6.0) is explicit dependency now (for netstandard1.3)

BeforeRun and AfterRunSuccess events

01 Nov 15:45
v3.1.0

Choose a tag to compare

  • New events added to ITask: BeforeRun, AfterRunSuccess (AfterRunFail already exist)
  • Tests optimized, now takes only 12 seconds

Easier to write and test

31 Oct 14:35
v3.0.0

Choose a tag to compare

Previous version was not friendly to unit-testing, this changed v3!

In v3, your task should not inherit from specific class - just implement IRunnable interface (with one Run method)!

Also, all services/options you need - accept them in class constructor (and don't forget to register in DI). Your task class now resolved from DI container on every run, and all dependencies are injected by DI infrastructure.

You will find your new tasks are much easier to unit-test.

v2.4.1: net451 and net46 are back

18 Jul 20:32
v2.4.1

Choose a tag to compare

Target framework monikers net451 and net46 are back.

v2.4.0: ITask.AfterRunFail

15 Jul 20:59
v2.4.0

Choose a tag to compare

Event AfterRunFail added to base ITask interface.

v2.3.0: Upgrade to RTM

28 Jun 10:56
v2.3.0

Choose a tag to compare

Dependencies upgraded to 1.0.0 RTM versions

v2.2.0

24 May 16:02
v2.2.0

Choose a tag to compare

  • New event added: AfterRunFail with Exception info

v2.1.0: Upgrade to RC2

17 May 11:46
v2.1.0

Choose a tag to compare

  1. Target framework changed to netstandard1.3 (System.Threading v4.0.11 is new dependency)
  2. Other dependencies upgraded to RC2