fthomas / fs2-cron Goto Github PK
View Code? Open in Web Editor NEWFS2 streams based on cron expressions
License: Apache License 2.0
FS2 streams based on cron expressions
License: Apache License 2.0
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)
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?
I have tried (unsuccessfully) to use interruptWhen
on the stream. Is it possible to add example of canceling the stream as it is a basic function of scheduling? Thx
depends on alonsodomin/cron4s#187
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.
I am making a web backend, and trying to run tasks (lots of cron tasks) on cron schedule. How should I:
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?
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.