Whenever crontab execution failure on AWS EC2 deployment

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

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs