I believe you are talking about something like this:
t = Timer((t) -> println("running"), 1; interval=1) # print every 1 second
When running from REPL it indeed works. But REPL let’s scheduler switch between tasks. If we start a long-running not
yield-ing task after the timer is created, the scheduler will wait for this task to finish before launching the timer callback:
t = Timer((t) -> print("\nrunning\n"), 1; interval=1)
rand(1000, 1000) * rand(1000, 1000)
On my computer timer starts printing the message only after 35 seconds. Notably, if I uncomment
print(*) in the loop, Julia let’s scheduler switch tasks and timer works as expected again.