Appearance
Close of Business (COB)
Every night, Apache Fineract runs a batch process called the Close of Business job - usually abbreviated to COB. This process is the engine behind loan portfolio accuracy: it calculates arrears, posts accruals, applies penalty charges, updates account statuses, and advances the system's business date. Without COB, a loan portfolio would not reflect the true state of outstanding obligations.
Understanding what COB does helps your team interpret what they see in the system each morning and respond correctly when accounts change status overnight.
What COB Does
COB processes every active loan in the portfolio one by one. For each loan, it runs a sequence of steps:
Arrears tracking - checks whether any scheduled repayments have passed their due date without being paid. If they have, the loan's arrears status is updated and the arrears amount is recorded. This is the primary mechanism by which loans move into the "overdue" or "in arrears" state.
Penalty charge application - if the loan product is configured with overdue charges (late fees, penalty interest, or fixed penalties), COB applies those charges at the intervals defined in the product. A borrower who was 7 days overdue as of the last COB run and is still overdue today has a new penalty charge added to their account.
Interest accrual - for products using accrual-based accounting, COB posts the accrual journal entries that represent interest earned but not yet received. This is essential for financial statement accuracy: the income statement reflects interest earned over the period, not just interest paid in cash.
Account status updates - loans that have been fully repaid, written off, or that have met other closure conditions are moved to their final status. COB is what closes the loop on the loan lifecycle after the last repayment is processed.
Business date advancement - after processing all loans, COB advances the system's business date by one day. All subsequent date-sensitive calculations (repayment schedule generation, interest rate lookups, report date filters) use this business date rather than the server's wall-clock date. This is what allows a system serving multiple time zones to maintain a consistent operational calendar.
Why COB Matters for Your Institution
The most visible consequence of COB for branch staff is that accounts change status overnight. A loan that was in good standing yesterday may show as "1 day overdue" this morning. This is not an error - it is COB correctly advancing the arrears state.
For finance and compliance teams, COB is what drives:
- Portfolio at risk (PAR) calculations - the PAR ratios that appear in reports are calculated from the arrears data that COB produces. PAR is only as accurate as the last COB run.
- Accrual-based income recognition - the interest income line in financial statements depends on COB posting accrual entries each night.
- Penalty income - late fees and overdue charges that generate fee income are applied by COB.
- Regulatory reporting - reports submitted to central banks or regulators that include arrears data, income, and account status all depend on COB having run correctly.
If COB fails on a given night and is not corrected, the next morning's data will be one day stale. Repayment schedules will appear current when they are not. PAR figures will be understated. Accruals will not have been posted. This is why COB monitoring is a critical operational responsibility.
The Business Date
One of COB's less-obvious but important functions is maintaining the business date - a date that Fineract tracks independently of the server's wall-clock time.
The business date starts at the date configured when the tenant was provisioned and advances by one day each time COB completes successfully. Most date-sensitive operations in Fineract use the business date, not the current time:
- A loan repayment posted today is valued at the current business date
- A repayment schedule shows instalments relative to the business date
- Interest calculations use the business date as the reference point for days elapsed
The business date can also be manually advanced or set via the API, which is useful during initial setup, testing, or recovery from a failed COB run. In production, the business date should not lag behind the calendar date by more than one day.
COB and Business Events
COB triggers several business events that downstream systems can subscribe to. The most common are:
LoanAccrualTransactionCreatedBusinessEvent- fires when an accrual entry is posted for a loanLoanApplyOverdueChargeBusinessEvent- fires when a penalty charge is appliedLoanAccountsStayedLockedBusinessEvent- fires if any loans remain locked after COB completes (a sign of partial failure)
These events are delivered via the configured message broker (Kafka or ActiveMQ) alongside all other business events. See the Business Events page for integration options.
How Finecko Manages COB
On a self-hosted Fineract deployment, COB must be scheduled, monitored, and recovered from failure manually. Finecko handles this as part of the managed service:
- COB is scheduled to run at a time configured for your institution's timezone, typically in the early hours of the morning when transaction volumes are lowest
- The Finecko platform monitors each COB run and alerts the operations team if it fails to complete or takes significantly longer than expected
- If COB fails mid-run, the batch system retries failed partitions before marking the job as failed
- Any loans that remain locked after a failed COB run are identified and unlocked so normal processing can resume
For institutions with large loan portfolios, COB is parallelised across multiple worker nodes to reduce the processing window. Finecko configures the optimal worker configuration for your portfolio size.
Monitoring COB Status
Your team can check the status of the most recent COB run at any time via the API:
bash
curl https://your-instance.finecko.com/fineract-provider/api/v1/jobs \
-H "Fineract-Platform-TenantId: default" \
-H "Authorization: Basic $(echo -n 'mifos:password' | base64)"Look for the Loan COB job in the response. Key fields to check:
| Field | Meaning |
|---|---|
active | Whether the job is enabled |
currentlyRunning | Whether it is running right now |
lastRunHistory.status | SUCCESS or FAILED for the previous run |
lastRunHistory.jobRunEndTime | When the previous run completed |
nextRunTime | When the next run is scheduled |
If lastRunHistory.status is FAILED, contact Finecko support. The failure log contains the specific loans or steps that did not complete, which determines the recovery path.
For the full technical configuration reference covering COB environment variables, batch worker setup, and the remote job messaging system, see the Close of Business technical guide.