Comments (4)
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.
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.
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.
Closing.
from rufus-scheduler.
Related Issues (20)
- How to schedule a job and stop after some time? HOT 3
- scheduler.every vs scheduler.cron HOT 14
- Please allow arbitrary content-type headers HOT 1
- Rufus not triggering when running Puma as a daemon (Rufus 3.7, Puma 5.2.1) HOT 6
- Getting time when cron job is invoked HOT 3
- Ideas and discussion about tracking behavior HOT 14
- A better way to check if Rails was run from console HOT 16
- Why does `.at` execute the job immediately but `.cron` does not? HOT 1
- Is there a way to access when a job "would have" run HOT 11
- Rails reloader HOT 3
- [Question] Does scheduler runs at the specified time irrespective of day light savings for the provided timezone? HOT 5
- Frequently failing Rufus::Scheduler#around_trigger does not block test HOT 7
- Rufus and Database Connections HOT 4
- Scheduling thread can die silently HOT 7
- Potential bug in handling threads on failure HOT 6
- When I add a cron job with a time in the past, I get a scheduled job in the future HOT 1
- past date/time jobs are run immediately HOT 6
- schedule_at("Wed at 2pm") should always be the next available Wed at 2pm HOT 2
- Time zone not passed to worker threads HOT 2
- discard_past doesn't seem to be working for "every" jobs with max_work_threads HOT 1
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 rufus-scheduler.