Git Product home page Git Product logo

recurrenttasks's People

Contributors

justdmitry avatar lordmike avatar victorioberra avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

recurrenttasks's Issues

Stopping the task by a cancellation token

Is there a way to send a cancellation token to the task to stop it?

for example:

app.StartTask<SampleTask>(TimeSpan.FromSeconds(15), TimeSpan.FromSeconds(5), source.Token);

Optional cancellation token

It would be great to have the cancellation token on IRunnable.Run as an optional parameter so the new version will just work without any edition to the code.

I'll make a PR for that.

TryRunImmediately() not working when interval is 365 days

I have a lot of scheduled tasks and a 'scheduled taks monitor', where I can see all statuses etc. In the monitor I also implemented a button to fire 'TryRunImmediately'.

This works for all scheduled tasks with, except 2 tasks that have an interval set to 365 days. Some intervals are set to 7 days, they work. What is the maximum TimeSpan for being able to fire TryRunImmediately?

How to set FirstRunDelay?

In my ConfigureServices I have:

services.AddTask<UpdateElements>(o => o.AutoStart(TimeSpan.FromSeconds(30)));

And my method looks like:

public class UpdateElements: IRunnable
{
    private readonly IElementRepository _elementRepository;

    public UpdateElements(IElementRepository elementRepository)
    {
        _elementRepository= elementRepository;
    }

    public Task RunAsync(ITask currentTask, IServiceProvider scopeServiceProvider, CancellationToken cancellationToken)
    {            
        return Task.Run(() => {
            _elementRepository.UpdateElements();
        });
    }
}

Now I want to delay the first time with 5 minutes using FirstRunDelay. Where do I need to set this option?

Unexpected Cancellation

Hi,

I'm experiencing problems with RecurrentTasks. It looks like sometimes a RecurrentTask stops unexpected. In the logfile I find the warning "CancellationToken signaled, stopping...".

But I don't use a CancellationToken. How can I debug why a Recurrent Task is cancelled?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.