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.




command: bundle exec rake whenever --update-crontab --set environment=production

leader_only: true

The deployment on AWS fails because of following error:


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?

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

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

Trying again with this command.