Skip to main content

Legacy Batch: Replace the Cron Server with Scheduler, Step Functions, and Batch

Serverless & ContainersUpdated Manoj V.3 min read

Quick summary: On-demand Lambda Event Functions stop at 1,800 seconds as of 19 Nov 2026. Lambda Managed Instances can run async work for 5,400 seconds. Anything longer than that band belongs on AWS Batch, not on the VM that only exists for the schedule.

Key Takeaways

  • On-demand Lambda Event Functions stop at 1,800 seconds as of 19 Nov 2026
  • Lambda Managed Instances can run async work for 5,400 seconds
  • Anything longer than that band belongs on AWS Batch, not on the VM that only exists for the schedule
  • The lab diagram on 4 October 2026 still had a VM whose only purpose was a nightly script
  • On that date classic Lambda stopped at 900 seconds
Duration bands for legacy batch jobs: up to 1,800 seconds on on-demand Lambda Event Functions, up to 5,400 seconds of async work on Lambda Managed Instances, multi-hour on AWS Batch
Table of Contents

The lab diagram on 4 October 2026 still had a VM whose only purpose was a nightly script. On that date classic Lambda stopped at 900 seconds. As of 19 Nov 2026, on-demand Lambda Event Functions stop at 1,800 seconds. On Lambda Managed Instances, asynchronous invocations and supported event-source mappings can run for 5,400 seconds. Amazon MQ and DocumentDB mappings are outside that window and follow the 1,800-second maximum. Those ceilings are in the Lambda timeout documentation. The two-hour VM was in neither band. It existed only so Task Scheduler had somewhere to run.

This is not the EventBridge patterns post, which owns domain events. It is not the serverless strangler playbook, which owns the request path. The 90-minute LMI post owns that timeout as an operations topic. A Lambda whose handler is one SDK call belongs on the Scheduler spoke, not here.

Three bands

Normal runComputeStop
Up to 1,800 secondsOn-demand Lambda Event Function, started by EventBridge SchedulerThe job branches across hours of dependencies. Use Step Functions for the chain, not a longer function.
Up to 5,400 seconds, async or event-sourceLambda Managed InstancesYou needed a service that stays up. That is not a job. Amazon MQ and DocumentDB sources are outside this window.
Multi-hour, or an array of work itemsAWS BatchYou are about to raise a function timeout in a loop. Batch is the band.

Step Functions holds the dependencies between jobs. Scheduler is the clock. File arrival is a trigger, an S3 event or a similar signal, not a second cron that hopes the file is there.

Architecture diagram of EventBridge Scheduler starting Step Functions, which sends each job to classic Lambda, Lambda Managed Instances, or AWS Batch by run time

Figure: Scheduler is the clock, Step Functions holds the dependencies, and the run time picks the compute: up to 1,800 seconds on an on-demand Event Function, up to 5,400 seconds of async work on Lambda Managed Instances, longer or array work on AWS Batch. Open the draw.io source.

We recommend deleting the VM when the job fits a band. The trade-off is an AWS schedule and a compute service you did not operate before. Take that trade when the VM’s only job is the schedule. Keep a server when the workload is a long-running process with its own uptime, and then it is not a batch job.

Where this fails

What to do this week

  1. Export the cron entries and Task Scheduler tasks. One line per job: name, duration, dependency.
  2. Mark the band. Leave one-call API wrappers for the Scheduler spoke.
  3. Replace file-polling crons with an arrival event.
  4. Put dependencies in Step Functions. Do not encode them as “start this cron 20 minutes later.”
  5. If the estate is the modernization program, continue with application modernization.

What this post doesn’t cover

It does not price Step Functions transitions, design a fan-out of a million items, or explain EventBridge versus SNS versus SQS. The fan-out comparison is a different article. The one-call Scheduler spoke is a different article. Operations for LMI stay on the LMI guides.

Frequently asked questions

How do we retire a Windows or EC2 box that only runs nightly jobs?
Sort each job by duration. Under 1,800 seconds can be an on-demand Lambda Event Function, the ceiling as of 19 Nov 2026. From there to 5,400 seconds of asynchronous work can be Lambda Managed Instances. Multi-hour work and array jobs belong on AWS Batch. EventBridge Scheduler starts the run. Step Functions holds dependencies. Rehosting the VM keeps the box.
When should we not put the job on classic Lambda?
When a normal run is longer than 1,800 seconds, or when the work is a long-running service rather than a job. That 1,800-second ceiling is the on-demand Event Function timeout as of 19 Nov 2026. Crossing it with a retry loop is how the cron server survives.
What could go wrong if file arrival is modeled as a second cron?
The job runs on the clock, finds no file, and exits, or it runs late and processes yesterday. File arrival is an event, not a second schedule. Polling the bucket from the old VM is the pattern this page is trying to delete.
Is this the article about a Lambda that only calls one API?
No. A handler whose only job is one SDK call is the Scheduler spoke. This page is the batch estate: hours, dependencies, and file drops. Do not merge them.
Where do Step Functions patterns stop and this page start?
The patterns post owns workflow shapes. This page owns the choice of compute for a job that used to be a cron entry, and it links that post instead of redrawing it.
Manoj V.
Manoj V.

Enterprise AI Transformation

Enterprise AI transformation and implementation leader focused on pilot-to-production playbooks, with a background in financial services. Writes the FactualMinds guides on serverless, CI/CD, and DevOps on AWS, the delivery plumbing production AI depends on.

Enterprise AI TransformationPilot to ProductionFinancial ServicesAWS ServerlessCI/CDDevOps

Related AWS Services

Work with our certified AWS architects to implement the strategies covered in this article.

Not sure which approach fits?

Which AWS Compute Service Should I Use?

Lambda, ECS Fargate, EKS, EC2, App Runner, Beanstalk, or Lightsail? Answer 5 questions and get an opinionated recommendation with the comparison guide that goes deeper.

Use decision tree →

Recommended Reading

Explore All Articles »