Insights · Cloud · 2026 · 08 · 12

Moving Batch Jobs to the Cloud: Scheduling, Reruns, and Recoverability

A reliable cloud batch system assumes that triggers may be duplicated, jobs may stop halfway, and source data may arrive late. The goal is not to prevent every failure, but to make each run identifiable, repeatable, and verifiable.

Moving Batch Jobs to the Cloud: Scheduling, Reruns, and Recoverability

Define business time before choosing a scheduler

A common migration approach is to copy an on-premises Cron expression into a managed cloud scheduler. That answers when a process should start, but not which data the process owns. A settlement launched at 1:00 a.m. may belong to the previous business day rather than the current calendar date. If application code derives its scope from the system clock, a delayed start, a different deployment region, or a manual rerun can silently select the wrong records.

Pass an explicit business_date, interval, or partition to every execution. Record the time zone with the schedule and run metadata instead of relying on the host default. Global workflows must also define daylight-saving transitions, holidays, and month-end behavior. Decide what happens when the previous run is still active: reject overlap, queue the new run, or permit concurrency only when the jobs own separate partitions.

  • Time-based scheduling: Works well when source data has a known cutoff and downstream systems expect delivery within a fixed window.
  • Event-driven execution: Reduces latency after a file or upstream result arrives, but must tolerate duplicate events and partially uploaded objects.
  • Readiness-based orchestration: Fits multi-source pipelines; a schedule wakes the coordinator, which verifies that all required inputs are available.
  • Hybrid triggering: Uses events for normal processing and a periodic reconciliation scan to find missed partitions.

Model every run as an identifiable, re-entrant job

Cloud schedulers and messaging systems commonly provide at-least-once delivery, so duplicate starts are normal operating conditions. Instead of relying on a fragile promise that a job will run only once, define a stable logical key such as job_name + business_date + partition. Enforce it through a database uniqueness constraint, an orchestration state table, or a deterministic storage path. Keep the platform execution ID separately so operators can distinguish the original attempt from later retries.

The processing logic should also be idempotent. Replacing a complete output partition is generally safer than appending blindly. Database writes can use upserts, version checks, and unique constraints. Calls to ERP, CRM, billing, or notification systems should carry an idempotency key when the receiving API supports one. When it does not, persist separate states for request creation and confirmed completion; otherwise, a timeout leaves the job unable to determine whether another request would duplicate a real-world action.

  • Write results to a staging location, validate them, and publish through an atomic rename, pointer update, or transaction.
  • Attach checkpoints to meaningful partitions or record keys, rather than recording only an in-memory row counter.
  • Define success using completeness checks, required fields, expected files, and downstream readability—not merely a zero exit code.
  • Keep recoverable state outside the worker container so an evicted instance can restart or resume safely.

Treat retries, reruns, and backfills as different operations

A retry is another attempt within the same logical run, intended for transient conditions such as network timeouts, throttling, or short-lived locks. Configure a maximum attempt count, exponential backoff, and jitter, and retry only errors that might recover. Invalid input, missing permissions, and application defects do not improve with time. Retrying them indefinitely increases cost, delays the useful alert, and may repeatedly affect an external system.

A rerun processes the same business scope again, usually after code or source data has been corrected. A backfill creates runs for historical periods or partitions that were never processed. Both should be submitted through a controlled interface with parameters, requester, reason, and approval context—not by logging into a server and changing its clock. Large backfills need concurrency and rate limits so they do not overload source databases, exhaust API quotas, or consume the capacity reserved for current production work.

  • Retryable failure: Retain the logical job key, create a new attempt number, and preserve the previous error.
  • Non-retryable failure: Stop promptly and quarantine the input until data, access, or code is corrected.
  • Rerun: Record the application version, input version, and whether existing output will be replaced or versioned.
  • Backfill: Preview the partitions and dependencies, execute in bounded waves, and retain a cancellation mechanism.

Give operators enough evidence to explain the outcome

A green job status does not prove that the business result is correct. Run records should include the logical key, business date, trigger source, application version, start and finish times, input and output locations, record counts, attempt number, and error category. Logs, metrics, and traces should carry the same job key and execution ID so an engineer can follow a run from the scheduler through the worker, database, and external APIs.

Alerts should cover more than process crashes. Useful signals include a job that did not start before its deadline, an abnormal duration, late inputs, missing output partitions, or a successful run that produced no expected data. Before launch, test duplicate delivery, worker termination halfway through a write, delayed source files, external API timeouts, and backfills across date boundaries. The design is operationally complete when an on-call engineer can identify scope, retry safely, initiate a rerun, cancel a backfill, and verify the published result from a documented procedure. An experienced integration team can be useful where those responsibilities cross several cloud and enterprise systems.

Get started

Have a project like this?

Tell us your industry, current systems and budget range. We reply within two working days and offer a free 30-minute consultation.