0

I am currently using amazon's elastic beanstalk as my web server. I need to be able to run some cron jobs every minute (so launching machines and shutting them down is not an option).

The solutions i have found for now are:

  1. run an ec2 machine and run those cron's over there
  2. use aws ops that is bit complicated to setup + will eventually run an ec2 machine anyways.

both of those solutions seems like an over kill. is there any better solution out there? the perfect solution would be a "Platform as a service" (PaaS) one.

Thanks

Ben Yitzhaki
  • 1,376
  • 16
  • 31

2 Answers2

1

It looks like it's possible to do it directly inside Beanstalk:

AWS Elastic Beanstalk, running a cronjob

If the endpoint to be run is external facing (to the web) you could check out Azure Scheduler:

http://azure.microsoft.com/en-us/services/scheduler/

Community
  • 1
  • 1
Adam
  • 4,590
  • 10
  • 51
  • 84
  • I was hoping to use only amazon's set of tools, however, azure's service might be good for us. thanks – Ben Yitzhaki Dec 04 '14 at 16:00
  • check this link as well : http://stackoverflow.com/questions/11616205/run-scheduled-task-in-amazon-without-cron – kartik Jan 03 '15 at 17:17
0

well, few years after. here are some new options to deal with this issue:

  1. as Adam said, there is an option to set a recurring event in elastic beanstalks' configuration named "container commands". the behavior is as the following code: container_commands: name of container_command: command: "command to run" leader_only: true name of container_command: command: "command to run" reference: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-ec2.html#linux-container-commands
  2. Second option is using the Lambda functions with schedule events - http://docs.aws.amazon.com/lambda/latest/dg/with-scheduled-events.html

hope this will help anyone that bumps into this issue

Ben Yitzhaki
  • 1,376
  • 16
  • 31