serverlessawslambdacost-optimization

Scheduled function cost: what a cron job really costs in serverless

A function on a one minute schedule runs 43,200 times a month whether or not there is work to do. Polling schedules are the quietest source of waste in a serverless estate. Here is the arithmetic.

The C3X Team··6 min read

Quick answer

A Lambda on a one minute EventBridge schedule fires 43,200 times a month. At 512 MB and 300 ms that is 6,480 GB-seconds plus 43,200 requests, about $0.12 a month, so a single cron job is genuinely cheap. The cost appears in multiples: 200 scheduled functions across an estate is roughly $24 a month, and a one minute schedule on a 3 GB function running 20 seconds costs $43.20 a month for one job. EventBridge Scheduler charges $1.00 per million invocations beyond a 14 million free tier, adding little. The real waste is scheduled functions that find nothing to do, which in most estates is over 90 percent of their runs.

Scheduled functions are the easiest thing to create and the hardest thing to notice. Nobody reviews a cron job after it ships. It runs quietly, costs a little, and accumulates. In a mature estate, the collection of schedules is often a larger line than any single application, and almost all of that spend is functions waking up to discover there is nothing to do.

What one schedule costs

ScheduleInvocations per monthCost at 512 MB / 300 ms
Every minute43,200$0.12
Every 5 minutes8,640$0.02
Hourly720$0.002
Daily30Negligible

Individually, nothing here justifies a meeting. The variables that turn these into real money are memory and duration, both of which grow quietly as the job takes on more work.

Configuration, every minuteGB-seconds per monthMonthly cost
512 MB, 300 ms6,480$0.12
1024 MB, 2 s86,400$1.45
2048 MB, 10 s864,000$14.41
3008 MB, 20 s2,538,000$42.31
3008 MB, 60 s7,614,000$126.91

A one minute schedule on a heavy function is a full-time worker. At 3008 MB running 60 seconds every minute, you have built a permanently running 3 GB compute instance with a serverless price tag, and a small EC2 instance or a Fargate task would cost less. That is the point where thecontainer comparison becomes worth doing.

The scheduler itself

EventBridge Scheduler charges $1.00 per million invocations after a monthly free tier of 14 million. A classic EventBridge rule on a schedule costs nothing for the rule itself. Either way, at 43,200 invocations a month the scheduler layer is effectively free, so the decision between them is about features such as one-time schedules, time zones, and flexible time windows rather than price.

The waste nobody measures

The important question about a scheduled function is not what it costs per run, it is what fraction of runs do useful work. A poller checking a queue every minute when items arrive 40 times a day is doing useful work on about 3 percent of its runs. The other 97 percent is pure overhead: invocation charge, cold start where applicable, connection setup, a query, and a log line saying nothing to do.

That log line costs money too. CloudWatch Logs charges $0.50 per GB ingested. A function logging 2 KB per run at one minute intervals produces about 86 MB a month, which is $0.04 in ingestion plus storage at $0.03 per GB-month. Across 200 scheduled functions that is $8.60 a month in log ingestion for messages nobody reads, and log volume is frequently much higher than 2 KB once a framework adds request context.

Replacing polling with events

Polling patternEvent-driven replacement
Check S3 bucket for new filesS3 event notification
Poll a queue for messagesEvent source mapping, scales to zero
Check database for status changeDynamoDB Streams or change data capture
Poll a third-party APIWebhook where offered, back off where not
Check whether a job finishedStep Functions callback or completion event

Where an event source exists, using it eliminates the idle runs entirely and usually reduces latency at the same time. Where polling is unavoidable, such as a third-party API with no webhooks, widen the interval to what the business actually needs. Moving from one minute to five minutes cuts invocations by 80 percent, and very few internal processes genuinely need a 60 second detection window.

The alignment problem

Cron schedules cluster. Almost everything runs at the top of the hour, and a great deal runs at midnight UTC, which produces a concurrency spike that causes cold starts across the whole estate at once and can collide with account concurrency limits. It also concentrates load on shared dependencies: every scheduled job querying the same database at 00:00 creates a burst that a provisioned table or a small instance may throttle. Spreading schedules across the hour costs nothing and removes both problems. EventBridge Scheduler supports flexible time windows precisely for this, letting a job run anywhere within a 15 or 60 minute window, which smooths the spike without any code change.

An audit worth running

List every EventBridge rule and schedule in each account. For each, record the target, the interval, the function memory and average duration, and the fraction of runs that do work. Delete the ones whose owning service no longer exists, which in most estates is a surprising number. Widen the intervals that have no business justification. Replace pollers with event sources where possible. Then set a rule that new schedules under five minutes require a stated reason.

Scheduled work is not wrong, it is just invisible. Price schedules alongside the rest of yourserverless cost work and check new schedules against the resource catalog at review time, when an interval is still a one-line change.

FAQ

How much does a Lambda cron job cost?

A function on a one minute EventBridge schedule fires 43,200 times a month. At 512 MB and 300 ms that is 6,480 GB-seconds plus 43,200 requests, roughly $0.12 a month. The cost grows quickly with memory and duration: the same schedule on a 3008 MB function running 20 seconds costs about $42 a month for a single job.

Does EventBridge charge for scheduled rules?

A classic EventBridge rule on a schedule has no charge for the rule itself. EventBridge Scheduler charges $1.00 per million invocations after a 14 million monthly free tier. At typical cron volumes, such as 43,200 invocations a month for a one minute schedule, the scheduler layer is effectively free, so choose between them on features rather than cost.

When is a scheduled function more expensive than a server?

When it approaches continuous execution. A 3008 MB function running 60 seconds on a one minute schedule consumes about 7.6 million GB-seconds a month, roughly $127, which is a permanently running 3 GB worker priced as serverless. At that point a small always-on instance or a Fargate task is usually cheaper and simpler.

What is the biggest waste in scheduled functions?

Runs that find nothing to do. A poller checking every minute for work that arrives 40 times a day does useful work on about 3 percent of its invocations. The other 97 percent still pays the request charge, any cold start, connection setup, a query, and a log line, none of which produces value.

How do I reduce scheduled function cost?

Replace polling with event sources where they exist: S3 event notifications, SQS event source mappings, DynamoDB Streams, and workflow completion callbacks all remove idle runs entirely. Where polling is unavoidable, widen the interval, since moving from one minute to five cuts invocations by 80 percent. Then audit for schedules whose owning service no longer exists.

How does C3X help with scheduled function cost?

C3X prices scheduled rules and their target functions from Terraform, so an interval defined in code shows its monthly cost at review time. That is when a one minute schedule on a heavy function is cheapest to question, and it makes the cumulative cost of an estate's schedules visible rather than spread invisibly across a compute line.

What to do next

Make your schedules visible before they multiply. C3X reads your Terraform and prices your resources against a live catalog. Start with the quickstart.

Try C3X on your own Terraform

Free and open source. No API key required. One command to install, one command to estimate.