Giter Site home page Giter Site logo

Comments (4)

jmettraux avatar jmettraux commented on May 18, 2024

Hello, thanks for reporting.

I don't know about this one. Should I consider it a bug and take the time to fix it ? Using a frequency < 1s "fixes" it.

Then scheduler is meant not to waste too much time when waking up and checking for jobs to trigger (Well maybe you have lots of jobs and that's becoming visible).

Your description in the gist is not accurate. It's not "trigger a job every 10s" but "trigger a job at seconds 0,10,20,30,40,50".

Setting a custom :frequency may make more sense for "in" and "at" jobs. Maybe I should add a warning to the documentation.

If you really really need that to work, I could re-implement the cron system to re-schedule each triggered cron job instead of iterating over cron jobs to filter the one that matches. That's a subtle yet radical change. Not sure about introducing it.

from rufus-scheduler.

soulware avatar soulware commented on May 18, 2024

Hi,

I think maybe a warning in the documentation would be fine here - as you say, setting the frequency to <1s allows the cron style jobs to run as expected.
Do you think there are any situations where the default frequency would still not run at least once per second? What if a blocking job was running at the time?

from rufus-scheduler.

jmettraux avatar jmettraux commented on May 18, 2024

I think under heavy load it's always possible to have "gaps".

Blocking jobs should be used with care.

Maybe you want something like http://gist.github.com/284467 (if you swap lines 17 and 18, the behaviour should be OK, though it's a blocking scheduler). This is how I do scheduling in the latest version of http://github.com/jmettraux/ruote

from rufus-scheduler.

jmettraux avatar jmettraux commented on May 18, 2024

Closing.

from rufus-scheduler.

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.