class ThisIsMyMonday : IWorkflow { private ITrashCleanupService _cleanupService; private IDogWalkingService _dogWalkingService; private IDishCleaningService _dishCleaningService; public CleanTrash(ITrashCleanupService cleanupService, IDogWalkingService dogWalkingService, IDishCleaningService dishCleaningService) { _cleanupService = cleanupService; _dogWalkingService = dogWalkingService; _dishCleaningService = dishCleaningService; } public void Build(IWorkflowBuilder workflow) { workflow .Cron("0 0 8 ? * MON *") .Then(CleanoutTrash) .Timer(Duration.FromHours(2)) // Sleep for 2 hours .Then(WalkTheDog) .Then(DoTheDishes); } private ValueTask CleanoutTrash(ActivityExecutionContext context) => _cleanupService.CleanupTrashAsync(context.CancellationToken); private ValueTask WalkTheDog(ActivityExecutionContext context) => _dogWalkingService.WalkTheDogAsync(context.CancellationToken); private ValueTask DoTheDishes(ActivityExecutionContext context) => _dishCleaningService.DoDishesAsync(context.CancellationToken); }