EndPointCorp / end-point-blog

End Point Dev blog
https://www.endpointdev.com/blog/
17 stars 66 forks source link

Comments for Elastic Beanstalk Whenever #1076

Open phinjensen opened 7 years ago

phinjensen commented 7 years ago

Comments for https://www.endpointdev.com/blog/2015/01/elastic-beanstalk-whenever/ By Kent Krenrich

To enter a comment:

  1. Log in to GitHub
  2. Leave a comment on this issue.
SuperAndreyEG commented 2 years ago

I was able to deploy app with config like this

files: "/opt/elasticbeanstalk/hooks/appdeploy/post/99_update_cron.sh": mode: "000755" owner: root group: root content: |

!/usr/bin/env bash

  . /opt/elasticbeanstalk/support/envvars
  . /opt/elasticbeanstalk/support/envvars.d/sysenv
  su -c "cd $EB_CONFIG_APP_CURRENT; bundle exec whenever --update-cron --set='environment=$RACK_ENV'" - $EB_CONFIG_APP_USER

but it seems that cron job in not running. Do you know how to fix it?

schedule.rb is like this

ENV.each_key do |key| env key.to_sym, ENV[key] end

set :output, '/log/cron.log'

every 1.minute do runner 'DedicatedServer.ping_all' end