Comments (4)
Hello, I would need more details. Could you please gist your exact test script?
I don't have a Ubuntu 12.04, I'll try on a Debian system.
Thanks in advance.
from rufus-scheduler.
It's probably something to do with how my unicorn+nginx setup is spawning processes, but the inner workings of Ruby threads are a bit over my head.
Here's the gist: git://gist.github.com/2584148.git
And thanks for the prompt reply. :-)
from rufus-scheduler.
Well... I guess your Unicorn is spawning multiple Ruby runtimes. Let's say it's spawning 4 Ruby runtimes, at that point you'll have 4 schedulers.
Since the runtimes are spawns, the instances are copies, but the rufus-scheduler thread is not started, that's probably why you need to do "start". At some points your runtimes will get killed by Unicorn (new runtimes will get started), it depends on your configuration. When a runtime exits, its rufus-scheduler's jobs will get lost as well.
I'm guessing that your development environment is served by a plain Webrick while your production environment is Unicorn + Nginx.
I invite you to carefully read your Unicorn documentation, to learn about the Unix process model and to learn about Ruby threads. You cannot go on with such knowledge being over your head.
Please level up and/or look at alternatives.
I noticed you're using resque, why not take a look at https://github.com/bvandenbos/resque-scheduler ? It's a resque + rufus-scheduler integration.
Cheers,
John
from rufus-scheduler.
Hey John,
Great feedback. Thanks.
I gave resque-scheduler a try but was having a hard time finding a good way to start the scheduler and keep it running with capistrano. Will keep up the fun
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.