Skip to content

Commit

Permalink
Merge pull request #11806 from johnsgp/fix-documentation-of-scheduleOnce
Browse files Browse the repository at this point in the history
Fix documentation of scheduleOnce
  • Loading branch information
mkurz committed May 12, 2023
2 parents 7c0abcb + 2b933f3 commit c851b15
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class CodeBlockTask @Inject() (actorSystem: ActorSystem)(implicit executionConte

//#schedule-block-once
class ScheduleOnceTask @Inject() (actorSystem: ActorSystem)(implicit executionContext: ExecutionContext) {
actorSystem.scheduler.scheduleWithFixedDelay(initialDelay = 10.seconds, delay = 10.seconds) { () =>
actorSystem.scheduler.scheduleOnce(delay = 10.seconds) { () =>
// the block of code that will be executed
actorSystem.log.info("Executing something...")
}
Expand Down

0 comments on commit c851b15

Please sign in to comment.