amazon-web-servicescron

run scheduled task in AWS without cron


Currently I have a single server in amazon where I put all my cronjobs. I want to eliminate this single point of failure, and expose all my tasks as web services. I'd like to expose the services behind a VPC ELB to a few servers that will run the tasks when called.

Is there some service that Amazon (AWS) offers that can run a reoccurring job (really call a webservice) at scheduled intervals? I'd really like to be able to keep the cron functionality in terms of time/day specification, but farm out the HA of the driver (thing that calls endpoints at the right time) to AWS.

I like how SQS offers web endpoint(s), but from what I can tell you cant schedule them. SWF doesn't seem to be a good fit either.


Solution

  • You can invoke a Lambda function on a schedule.

    Currently, the minimum resolution that a scheduled lambda can run at is 1 minute (the same as cron, but not as fine grained as systemd timers).

    The Lambder project helps to simplify the use of scheduled functions on Lambda.

    λ Gordon's cron example has perhaps the simplest interface for deploying scheduled lambda functions.


    Original answer, saved for posterity.

    As Eric Hammond and others have stated, there is no native AWS service for scheduled tasks. There are only workarounds and half solutions as mentioned in other answers.

    To recap the current options:

    Hopefully a better solution will come along soon.