jmettraux/rufus-scheduler — Issue #30: Cron lines don't work in production when minutes are "0"
Author: schneider-th
Created: 2012-02-25 12:42:08+00:00
State: open

Hey,

I know that the issue sounds a little but strange, but my cron jobs don't work, when I set minutes to "0".

I have a setup with a local Rails 3.0.12 app on OSX Lion in development environment and the online version, which is hosted on a VPS running Ubuntu 10.04.

My task_scheduler.rb has several job runnings, which are always similar to one of the following lines:

scheduler.in '1m' do
scheduler.every '1h' do
scheduler.cron '0 12 * * 1-7' do

The first line is for testing and always works in development as in production mode. The second line with 'every' also works in both environments. The problem I have is with the third line.

In my local development mode the cron task works and does what it should be. But on my production server it is not executed. But after playing around with the code, I found out, that the job gets executed when it's set to another time. So

scheduler.cron '15 12 * * 1-7' do

works just fine. After finding out it's not a problem anymore, but it still seems very odd, which is why I wanted to let you know. And yes, I tested it several times and tried several numbers and really the only line which does not work is when minutes is set to '0'.