-
Notifications
You must be signed in to change notification settings - Fork 725
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to test in development environment? #351
Comments
To update your local crontab in development mode, you'll need to run the From there, you can run |
Thanks @javan! However, this didn't work for me. I ran: $ whenever --update-crontab --set environment=development
# => [write] crontab file updated
$ crontab -l
# => # Begin Whenever generated tasks for: config/schedule.rb
# => 0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58 * * * * /bin/bash -l -c 'cd /Users/app && script/rails runner -e production '\''Cron.get_categories'\'' >> log/cron.log 2>> log/error.log'
# => # End Whenever generated tasks for: config/schedule.rb
# => # Begin Whenever generated tasks for: /Users/app/config/schedule.rb
# => * * * * * /bin/bash -l -c 'cd /Users/app && script/rails runner -e development '\''Cron.get_categories'\'' >> log/cron.log 2>> log/error.log'
# => # End Whenever generated tasks for: /Users/app/config/schedule.rb And nothing happened. 😕 I'm using a Mac OSX (10.8.3 version), Rails 3.2.13 and Ruby 2.0.0. Your answer left me a doubt... This means that to use Another question... If I create a new cron or just update the time that each cron will run, I need execute this command again? Thank you so much @javan! |
Check your log/cron.log file, I suspect it's being written to every 2 minutes. If you're using Capistrano to deploy your application, Whenever has built-in tasks to write your crontab. They're not required though, it can always be used as a command line tool. |
This is the error: # log/error.log
/Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:45:in `gem_original_require': no such file to load -- bundler/setup (LoadError)
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:45:in `require'
from /Users/app/config/boot.rb:6
from script/rails:5:in `require'
from script/rails:5 And this on my # config/boot.rb at line 6
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE']) |
@fabianoalmeida in your local crontab, instead of
run the command with
... to find out your full path to bundle, just run
|
I have a cron on my app and I'm trying to test it, but it's not running. My config:
My schedule
And my cron
And the text is not printing on my console. Is there any other configuration to do?
Thanks in advance!
The text was updated successfully, but these errors were encountered: