Skip to content

Whenever tasks not running on Rails 4 #500

Open
@zsherman

Description

@zsherman

Googled around a bunch and couldn't find a good answer for this.

I set up whenever per the docs in my rails 4.1.6 app, and am having it run a simple task in schedule.rb:

set :output, "#{path}/log/cron.log"

every 15.minutes do
  runner "Order.sync_orders"
end

Order.rb:

#other crap

def self.sync_orders
    #do stuff
end

Running 'whenever' results in the output:

0,15,30,45 * * * * /bin/bash -l -c 'cd /Users/zach/Apps/myapp && bin/rails runner -e development '\''Order.sync_orders'\'' >> /Users/me/Apps/myapp/log/cron.log 2>&1'

## [message] Above is your schedule file converted to cron syntax; your crontab file was not updated.
## [message] Run `whenever --help' for more options.

The cron.log file is not written to, nor does the method actually get called. The output of crontab -l does indeed list the job there.

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions