Ben Yitzhaki
Ben Yitzhaki

Reputation: 1416

cron jobs on amazon aws

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

Upvotes: 0

Views: 3448

Answers (2)

Ben Yitzhaki
Ben Yitzhaki

Reputation: 1416

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

Upvotes: 0

Adam
Adam

Reputation: 4780

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/

Upvotes: 1

Related Questions