how to execute rake tasks using whenever gem, in amazon aws server in ruby on rails? -


iam using whenever gem execute rake task, in rails application. in development environment working fine following code.

 set :environment, "development"  set :output, {:error => "log/cron_error_log.log", :standard => "log/cron_log.log"}   every :day, :at => '12:10pm'   runner "employee.assign_shift_policies"  end  

and in terminal create crontab , run cron tab file using whenever gem iam running following commands.

 whenever  whenever -w  

and tasks executing correctly. , output of these rake tasks appending following log files properly.

 log/cron_error_log.log  log/cron_log.log 

in development everthing working fine. how run these background jobs in amazon aws beanstalk server, means how execute these whenever , whenever -w commands in amazon aws server generate crontab , execute jobs in aws server using elastic beanstalk?

now, using whenever-elasticbeanstalk gem. getting following error in eb-activity.log file.

command execution failed: activity failed. (elasticbeanstalk::activityfatalerror) caused by: /var/app/ondeck/vendor/bundle/gems/whenever-elasticbeanstalk-1.1.6/bin/create_cron_leader:10:in `join': no implicit conversion of nil string (typeerror)   /var/app/ondeck/vendor/bundle/gems/whenever-elasticbeanstalk-1.1.6/bin/create_cron_leader:10:in `<top (required)>'   /var/app/ondeck/vendor/bundle/bin/create_cron_leader:23:in `load'   /var/app/ondeck/vendor/bundle/bin/create_cron_leader:23:in `<main>'    (elasticbeanstalk::externalinvocationerror) 

you have gem doing need:

https://github.com/dignoe/whenever-elasticbeanstalk


Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -