Git Product home page Git Product logo

fs2-cron's Issues

release fs2-cron-cron4s for Scala 3

Hi, it looks to me like nothing is blocking a Scala 3 release?

Let me know if there's something I can do to make it happen :) (it's blocking an upgrade for me)

Support Scala 2.11

fs2-cron looks perfect for something I'm trying to do. Unfortunately the project I'd like to use it in is tied to 2.11 and fs2-cron is currently only published for 2.12.

If it's not a priority for you, would you welcome a PR tackling this?

Allow specification of timezones for Cron schedule

Right now the library is hard-coded to use the local time for the cron schedule, but there are use cases where it's important that another timezone is used (especially UTC). Hence, fs2-cron should allow the callers to specify a timezone.

Cancel a schedule on demand

I am making a web backend, and trying to run tasks (lots of cron tasks) on cron schedule. How should I:

  • Add a new schedule to the group of existing schedules?
  • Remove, or reschedule an existing schedule on demand?

In the example, the interruptWhen is controlled by a signal within the same for-comprehension. How can I instead control this signal outside, upon receiving a new http request?

Support using cats-effect's Clock for determination of current time

Right now, the fs2-cron uses LocalDateTime.now() to determine the current time of execution. This is somewhat consistent with the usual Cron scheduler on Unix, however the implementation requires a Timer already for most times, which gives access to a Clock object that allows to retrieve the current time.

Using the Clock from the injected Timer would have the advantage that, depending on the Timer used, the user of the library can decide which time zone should be used, e.g. in case they want to base the schedule on UTC rather than local time.

A disadvantage is that the default implementation provided by cats-effect uses Java's currentTimeMillis, which is based on UTC time instead of local time, so it might be somewhat difficult to realise this without breaking the API.

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.