Whenever crontab execution failure on AWS EC2 deployment

37 views
Skip to first unread message

Ankur Kumar

unread,
Jun 30, 2014, 4:05:51 AM6/30/14
to rubyonra...@googlegroups.com

I am using whenever gem and I defined 'whenever crontab execution' command in .ebextensions folder for AWS EC2 instance. 

-RAILS_ROOT/.ebextensions/whenever_task.config

container_commands:
 20whenever_task:
   command: bundle exec rake whenever --update-crontab --set environment=production
   leader_only: true

The deployment on AWS fails because of following error:

-EC2_ROOT/var/log/eb-tools.log

2014-06-30 00:42:46,257 [INFO] (22990 MainThread) [directoryHooksExecutor.py-29] [root directoryHooksExecutor info] Script succeeded.
2014-06-30 00:43:58,172 [INFO] (22944 MainThread) [command.py-130] [root command execute] Command returned: (code: 1, stdout: Error occurred during build: Command 20whenever_task failed
, stderr: None)
2014-06-30 00:43:58,174 [DEBUG] (22944 MainThread) [commandWrapper.py-60] [root commandWrapper main] Command result: {'status': 'FAILURE', 'results': [{'status': 'FAILURE', 'config_sets': ['Infra-WriteRuntimeConfig', 'Infra-WriteApplication1', 'Infra-WriteApplication2', 'Infra-EmbeddedPreBuild', 'Hook-PreAppDeploy', 'Infra-EmbeddedPostBuild', 'Hook-EnactAppDeploy', 'Hook-PostAppDeploy'], 'returncode': 1, 'events': [], 'msg': 'Error occurred during build: Command 20whenever_task failed\n'}], 'api_version': '1.0'}

Any help on this?

--
Regards,
Ankur

Ankur Kumar

unread,
Jul 1, 2014, 1:51:48 AM7/1/14
to rubyonra...@googlegroups.com

I observed there is a typo in command, it should be : 

bundle exec whenever --update-crontab --set environment=production. 

Trying again with this command. 

Thanks. 

--
Regards,
Ankur 

Reply all
Reply to author
Forward
0 new messages