Hey, this is still a WIP, but I'm building [redacted]. We wrap an open-source workflow orchestrator Temporal that offers "durable execution" with very detailed execution tracing and a bunch of recovery mechanisms. We offer a fully-managed Temporal cluster, hosted runtime (so you don't need to worry about provisioning/scaling workers), and offer version control integrations, CI/CD and dynamic config out of the box - so you can go from code to running workflows with no infrastructure overhead. Think "lambda for workflows". Feel free to get on our waitlist!
Here's how a cron job implementation would look with Temporal -
` func Subscription(ctx [redacted].Context, userUUID string) error { free_trial_on := true
for {
if free_trial_on {
// Sleep until trial period passes
[redacted].Sleep(ctx, days(15))
free_trial_on = False
} else {
// Charge subscription fee
[redacted].ExecuteActivity(ctx, ChargeSubscriptionAndEmailReceipt, userUUID, frequency).Get(ctx, nil)
// Sleep until next payment is due
[redacted].Sleep(ctx, days(30))
}
}
}
`