help help
You need help, but you're not very helpful.
I tend to say, please read how to ask questions the smart way? or how to report bugs effectively (which is translated in many languages), but it flies above many heads, unfortunately. Let's try to be more directive.
I do x, but it doesn't work
Your issue report / plea for help looks like "I do x, but it doesn't work". That's not enough to help you.
-
What Ruby version are you using?
-
On what operating systems do you run that? (name, version, etc...)
-
In the case of Rails, what version are you using?
-
In the case of Rails, on what "server" are you running Rails (Passenger, Thin, Unicorn, ...)?
-
Have you tried reducing the issue to its simplest form?
It runs fine in development, but it doesn't work in production
Your issue report is something like "It runs fine in development, but it doesn't work in production". Great, but
- What's different between development and production (you're probably developing on Mac and deploying on Linux, so please say so)
- What versions (OS, Ruby, Rails, server) on development and what versions on production?
It doesn't work
Try to avoid saying "It doesn't work", sentences like "it doesn't produce any output" are far better.
When you find yourself thinking "it doesn't work" then translate it to "it should update a timestamp on a record every hour", you're then on the good path of splitting the issue into "it doesn't wake up every hour" and "it wakes up every hour but, somehow, the timestamp is not updated". Congratulations, you just became better at the craft of programming. Now, as someone skilled, you're supposed to determine on your own whether it's A or B and ask for help about A or B (and not about "it doesn't work").
You are experiencing the issue, you're sitting right in front of the terminal, you have access to all the information. You have to transmit that information to potential helpers. Cut the time necessary to get help. If you write "it doesn't work", then one day later receive a "could you give more details?", then pass the details and then wait 1 more day for an answer (or a plea for more details), you've lost at least 1 day.
I made a script a while back that used CronLine.
The scripts function is to check, what job should have been executed in the last 24 hours, and then execute them now.
I used the CronLine and next_time functions to do it.
Now the CronLine function seems to have been deleted.
What can I use instead?
You can find my script
here.