How to know when a task is done?

The problem is that, even with your clarification, “notify me” is ill defined. You are not your program after all - there is no automatic message queue or notification bar or something like that, you’ll have to create something that handles finished tasks for you. This is what @findmyway meant when they mentioned you have to create another Task that handles those for you. One way to achieve that is to have each task you spawned take e.g. a Channel to put results, errors etc. into and have a number of other tasks pull results out of that channel and act according to whatever that result is (e.g. spawn new tasks, write them to a file, etc.)

If you want it to work interactively, I’d look into ReplMaker.jl. You will have to decouple the interactive part from the standalone part, else your code will probably beome a lot harder to maintain.