Giter VIP home page Giter VIP logo

Comments (11)

jmettraux avatar jmettraux commented on June 1, 2024

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.

jakemack avatar jakemack commented on June 1, 2024

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.

jmettraux avatar jmettraux commented on June 1, 2024

OK, I will investigate that. Give me some time.

https://github.com/floraison/fugit/blob/master/spec/cron_spec.rb#L115-L200

from fugit.

jakemack avatar jakemack commented on June 1, 2024

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.

jmettraux avatar jmettraux commented on June 1, 2024

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.

jakemack avatar jakemack commented on June 1, 2024

Thanks for the quick turnaround! I should have time to test today, I'll report back my results once I do

from fugit.

jakemack avatar jakemack commented on June 1, 2024

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.

jmettraux avatar jmettraux commented on June 1, 2024

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.

jakemack avatar jakemack commented on June 1, 2024

rufus-scheduler (2.0.24)

from fugit.

jmettraux avatar jmettraux commented on June 1, 2024

Thanks again!

from fugit.

jmettraux avatar jmettraux commented on June 1, 2024

rufus-scheduler 3.5.1 and fugit 1.1.4 released. Thanks!

from fugit.

Related Issues (20)

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.