You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to run a model method in my cron job with whenever.
schedule.rb : `env :PATH, ENV['PATH']
set :output, "./cron.log"
every 1.minute do
runner "Stock.fetch_and_update_stock_data"
end`
the model method runs perfectly fine in rails console however putting it through CRON with whenever returns the error:
cron.log : bundler: failed to load command: bin/rails (bin/rails) /home/jcsii98/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/activerecord-7.0.6/lib/active_record/connection_adapters/sqlite3_adapter.rb:387:in table_structure': Could not find table 'stocks' (ActiveRecord::StatementInvalid)`
Any suggestions?
The text was updated successfully, but these errors were encountered:
I am trying to run a model method in my cron job with whenever.
schedule.rb : `env :PATH, ENV['PATH']
set :output, "./cron.log"
every 1.minute do
runner "Stock.fetch_and_update_stock_data"
end`
the model method runs perfectly fine in rails console however putting it through CRON with whenever returns the error:
cron.log :
bundler: failed to load command: bin/rails (bin/rails) /home/jcsii98/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/activerecord-7.0.6/lib/active_record/connection_adapters/sqlite3_adapter.rb:387:in
table_structure': Could not find table 'stocks' (ActiveRecord::StatementInvalid)`Any suggestions?
The text was updated successfully, but these errors were encountered: