run scheduled task in AWS without cron
Master System Design with Codemia
Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.
Introduction
You do not need a traditional operating-system cron daemon to run scheduled work in AWS. The usual cloud-native answer is to let a managed service trigger the task for you, most often by using EventBridge or EventBridge Scheduler to invoke Lambda, Step Functions, ECS, or another AWS target.
The Main AWS Pattern: Managed Scheduler Plus Target
The idea is simple. Instead of keeping an EC2 instance alive just to run cron, you define a schedule and tell AWS what should happen when that schedule fires.
Typical targets include:
- a Lambda function for short stateless jobs
- a Step Functions state machine for multi-step workflows
- an ECS task for containerized batch work
- an SQS queue or SNS topic for decoupled downstream processing
For many workloads, Lambda plus a managed scheduler is the cleanest option.
A minimal Lambda handler in Python might be:
The scheduling logic lives outside the function. The function simply reacts to the invocation.
EventBridge and EventBridge Scheduler
AWS has two closely related scheduling approaches. EventBridge rules can trigger on a schedule, and EventBridge Scheduler is a dedicated scheduling service that supports one-time and recurring invocations with flexible target integration.
A common pattern is to schedule a Lambda function every hour or every day. Even though AWS scheduling expressions may still use rate or cron-like syntax internally, the important point is that you are not managing a cron process on a server.
Example AWS CLI command for a recurring EventBridge rule targeting Lambda:
Then attach the target:
This lets AWS trigger the function on schedule without any dedicated machine.
When Lambda Is Not the Right Target
Not every scheduled job fits in a Lambda timeout window or memory profile. If the work is longer-running, CPU-heavy, or containerized already, schedule an ECS task instead.
That pattern is common for:
- nightly ETL jobs
- report generation with native dependencies
- batch image or file processing
- data sync jobs that exceed Lambda limits
For multi-step logic with retries, branching, or waiting between steps, Step Functions is often a better target than one large Lambda function.
The scheduler wakes up the workflow, and the workflow handles orchestration.
One-Time Delays and Per-Job Timing
Sometimes the question is not "run this every day," but "run this once 30 minutes from now." In that case, EventBridge Scheduler is often a better fit than a repeating rule because it supports one-time schedules directly.
If the job should happen after a short delay inside a larger asynchronous system, SQS delay queues or Step Functions Wait states can also solve the problem. Those are not general-purpose calendar schedulers, but they are good for workflow-relative timing.
The correct service depends on whether you want:
- calendar scheduling
- repeated periodic scheduling
- one-time future execution
- workflow-relative delay
Why This Is Better Than Server Cron
A managed scheduler avoids several operational problems:
- no always-on EC2 instance just to run a timer
- no patching or monitoring a cron host
- clearer permissions through IAM
- easier integration with serverless and container targets
- better visibility through CloudWatch logs and AWS service events
In other words, the task becomes an infrastructure definition rather than a hidden shell entry on one machine.
Common Pitfalls
A common mistake is equating "without cron" with "without schedule expressions." In AWS, you can still use rate(...) or cron-style expressions while avoiding an actual cron daemon.
Another mistake is using Lambda for jobs that really need container resources or longer execution time. The scheduler is only half the design; the target still has to match the workload.
Teams also forget permissions. The scheduling service needs permission to invoke the target, and the target needs permission to do its own work once invoked.
Finally, do not schedule stateful jobs without considering idempotency. A retried or duplicated invocation can happen, so the job design should tolerate reruns safely.
Summary
- In AWS, scheduled work is usually driven by a managed service, not an operating-system cron daemon.
- EventBridge rules and EventBridge Scheduler are the standard ways to trigger recurring or one-time jobs.
- Lambda is a common target, but ECS and Step Functions are often better for larger workflows.
- Choose the solution based on whether you need periodic scheduling, one-time execution, or workflow-relative delay.
- Designing the target correctly matters just as much as choosing the scheduler.

