← Back to Projects
DevOps & Tooling

Scheduled Jobs & Workflows

From in-process cron to durable Temporal workflows

Bootstrapped the service · co-led the migration to Temporal · Dec 2024 — Sep 2025
Go Temporal Kafka gRPC MySQL/GORM

Background

Payout jobs ran on in-process cron: no retries, no visibility into which tenant failed, and no way to resume a half-finished run.

Key Highlights

01

Multi-currency cashback and loyalty-bonus payouts credited to wallets over Kafka with unique order IDs

02

Temporal SDK, exponential-backoff retry policies and worker registry

03

Payout jobs rebuilt as parent workflows that fan out one child workflow per tenant, with a compensation step when publishing a credit fails

04

Daily segmentation reclassification with heartbeated, paginated activities

05

Guest-data cleanup as an idempotently created Temporal Schedule

Key Implementations

1

Parent/child workflows per tenant

A parent workflow lists tenants and starts one child workflow per tenant; each child pays out with unique order IDs and compensates if the publish fails.

Why: One tenant's failure no longer blocks the others, and each child can be retried and inspected on its own.

Technical Decisions

Technical Decisions Chosen Alternative Reason
Scheduler Temporal In-process cron with hand-written retries Durable execution, retries with back-off, heartbeats and a UI for every run, without building them ourselves.