Batch processing
Batch processing handles a group of records or jobs together as a set at scheduled intervals, instead of one at a time as each arrives. The end-of-day run is the usual example. Batches suit large volumes, but results are only as fresh as the last completed run.
What it is
Batch processing is a way of running work in which items are collected, held, and then processed together as a group on a schedule. A batch is a set of orders, records or jobs handled at one time, in contrast to real-time processing, where each item is handled as it arrives. Batch jobs normally run without a person in the loop after they are submitted.
The parts of a batch setup are:
- An input set, such as the day’s payments, trades or file extracts.
- A schedule or trigger that starts the run, often after a cut-off time.
- A sequence of jobs with dependencies, where one job starts only when the previous one succeeds.
- Controls that count and compare records going in and coming out.
- An output, such as updated balances, files for other systems or reports.
In banking and finance the end-of-day run is the best-known batch. It closes the business day and may post interest, update positions and balances, and produce reports, followed by start-of-day procedures for the next day. The cycle of tasks for a business day, from start-of-day to end-of-day procedures, is called daily processing.
Why it matters
A batch spreads a fixed set-up cost over many items and uses computing capacity when it is free, often overnight. It also gives a clear point in time at which data is complete and consistent, which accounting, reconciliation and reporting rely on.
The cost is delay. Data reflects the last completed run, so an event after the cut-off waits for the next run. When a job fails, every later job in the chain waits until the failure is fixed and the run restarts.
Worked example
Illustrative numbers. A payments system collects customer payments during the day and runs a batch after a cut-off time. The batch holds 10,000 payments.
- The controls record the input: 10,000 items with a total value of 5,000,000.
- Job 1 validates each payment. 9,950 pass and 50 are rejected to a repair queue.
- Job 2 posts the 9,950 accepted payments to accounts.
- Job 3 produces the outgoing file and the daily report.
- The controls confirm that accepted plus rejected items equal 10,000, and that posted value matches the accepted total.
A payment received just after the cut-off is not in this batch. It is processed in the next run, and its customer sees the effect one cycle later.
How to read it
Run duration, record counts and job status show whether a batch is healthy. A run that grows longer each period signals volume growth or a slow step. A mismatch between input and output counts signals lost or duplicated records.
Assumptions
- The input set is complete at the cut-off, so a late arrival is handled in a stated way.
- Jobs are rerunnable. A restart after a failure must not post the same item twice.
- The window between cut-off and the start of the next business day is long enough for the whole chain to finish.
Who uses it
- Payments operations analysts monitor the run, clear rejected items and release payments after the cut-off.
- Loan operations analysts rely on the run to post interest and repayments and to update balances.
- Data analysts in banking check that extracts and loads are complete and that figures agree across systems.
- Business analysts specify what runs in the batch, in which order and with which controls.
- Fund accountants wait for the end-of-day run to receive the prices and positions they need for the accounts.
Common confusions
- Equating batch with old technology. It describes a processing pattern and is used wherever grouping is efficient.
- Assuming a batch is always overnight. A batch can run at any scheduled interval, including several times a day.
- Treating a batch and real-time processing as exclusive. Many systems accept items in real time and settle or post them in batches.
- Reading a balance as live. A balance produced by a batch is as of the last completed run.