Comments (11)
Hello,
thanks for the suggestion. #brute_frequency
results are just indicative, none of the downstream libraries use it. As long as DST is respected by #next_time
, I do not want to invest time in changing that. As it is, it is good for me.
Best regards.
from fugit.
I can show the same issue using #next_time
as well. Given a cron that should run every day at 1:59 a.m., #next_time
will return two times on the same day, depending on when it is measuring from.
2.3.3 :120 > cron = Fugit::Cron.new("59 1 * * * America/New_York")
=> #<Fugit::Cron:0x0000000a4010a0 @original="59 1 * * * America/New_York", @cron_s=nil, @seconds=[0], @minutes=[59], @hours=[1], @monthdays=nil, @months=nil, @weekdays=nil, @zone="America/New_York", @timezone=#<TZInfo::DataTimezone: America/New_York>>
2.3.3 :121 > t = EtOrbi.make_time("2018-11-04 01:55:00 -0400")
=> #<EtOrbi::EoTime:0x0000000a4e4da0 @seconds=1541310900.0, @zone=#<TZInfo::DataTimezone: -0400>, @time=nil>
2.3.3 :122 > cron.next_time(t).to_t
=> 2018-11-04 01:59:00 -0400
2.3.3 :123 > t = EtOrbi.make_time("2018-11-04 01:59:00 -0400")
=> #<EtOrbi::EoTime:0x0000000a811050 @seconds=1541311140.0, @zone=#<TZInfo::DataTimezone: -0400>, @time=nil>
2.3.3 :124 > cron.next_time(t).to_t
=> 2018-11-04 01:59:00 -0500
As you can see, the second time is only one hour after the first, both on 2018-11-04.
from fugit.
OK, I will investigate that. Give me some time.
https://github.com/floraison/fugit/blob/master/spec/cron_spec.rb#L115-L200
from fugit.
Thanks! If I get some free time to look into it further before you get to it, I'll leave any new findings here.
from fugit.
Hello @jakemack,
please have a look at the change I made. Do tell me if it solves the issue. If yes, I will release fugit 1.1.4 with it. If not, we will iterate further.
Best regards.
from fugit.
Thanks for the quick turnaround! I should have time to test today, I'll report back my results once I do
from fugit.
I ran out of time yesterday but got to it this morning. Everything works as my tests expected! Thanks so much for the speedy solution. I had been putting off upgrading to rufus-scheduler 3 for months and then was sad when I ran into this issue. Now I'm very happy to see the finish line for the upgrade approaching! Feel free to close the issue when you see fit.
from fugit.
Thanks a lot, I'll release today then.
I had been putting off upgrading to rufus-scheduler 3 for months
I am curious, from what are you upgrading from?
from fugit.
rufus-scheduler (2.0.24)
from fugit.
Thanks again!
from fugit.
rufus-scheduler 3.5.1 and fugit 1.1.4 released. Thanks!
from fugit.
Related Issues (20)
- Incorrect #rough_frequency and #brute_frequency for '0 */5 * * *' HOT 1
- cron #next_time loop breaker issue HOT 2
- cron #next_time loop breaker issue HOT 6
- TZInfo::PeriodNotFound exception when using Time.zone HOT 6
- Incorrect transition into DST for America/New_York HOT 1
- previous_time and next_time produce strange results when combining actual dates with day of week HOT 3
- Support character "W" in the cron expression HOT 1
- Incorrect schedule in certain timezone when using hash cron extention HOT 7
- Fugit::Cron#to_cron_s produces invalid cron string for "wed%2" HOT 7
- Tighten `Fugit.parse` HOT 1
- Fugit.parse_cronish(str) and .do_parse_cronish(str) HOT 5
- strip before parsing? HOT 4
- Fugit::Cron#next_time works incorrectly with "every second day" and "mon-fri" combo HOT 2
- Behaviour change between 1.4.4 and 1.4.5 HOT 8
- be liberal with extra commas
- Implement the & cron modifier HOT 1
- Issue parsing 0/1 compared to * or */1 HOT 4
- Introduce OpenBSD cron ~ notation HOT 1
- Fugit.parse incorrectly parsing am/pm HOT 5
- time computation with monthly duration like "P-2M" is incorrect
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fugit.