Step 1 of 21 · 3 minutes

Customer Onboarding

The Scenario

When a customer applies for a credit card, we need to run identity verification, fraud checks, and card provisioning. These operations take 5-10 seconds each.

Running them synchronously during the web request would make the page feel slow.

The Challenge

How do we acknowledge the customer immediately while processing their application reliably in the background?

The Solution

Use jobScheduler.enqueue() to offload the heavy lifting to a background job. The web request returns instantly with "Application received!" while JobRunr processes the actual work asynchronously.

The @Job(name = "Create %0") annotation gives each job a meaningful name that appears in the dashboard, making it easy to find specific applications.

Read the documentation →

Try It Yourself

Register a new credit card and watch the job appear in the dashboard within milliseconds. Notice how the web page responds immediately — the background job handles the rest.
You need to log in to perform write operations. You can still view the code solution and dashboard.
Loading code...