I created a very small, simple package (Alert) for getting a desktop notification (a.k.a. “toast”) across platforms. Like so:
using Alert
for i in 1:10_000
long_running_function()
end
alert("Your julia script is finished!")
I find it helpful when I’m running something time consuming and want to know when it’s finished while doing other work.
I’ve tested it on MacOS and Windows 10, but I don’t have a linux system handy, so if someone could try it out and confirm that it pops up a notification of some sort, that would be really helpful.
(@v1.4) pkg> add Alert
Updating registry at ~/.julia/registries/General
Updating git-repo https://github.com/JuliaRegistries/General.git
ERROR: The following package names could not be resolved:
Alert (not found in project, manifest or registry)
Hi @xiadoai; can you give me some more details? I am not having any problem running it on Windows 10 on my machine. Do you get any error message? Your windows version? (I am also running it from within VSCode; that shouldn’t matter though).
Do you have notifications turned on? I just saw that the Julia command returns with ProcessExited(0) in the output you posted. That means that there was no error in running the power shell script (so as far as Julia can tell the command worked). Under the OS settings you should see something like the following:
That’s the only explanation I can currently think of for why you aren’t seeing anything. If that isn’t the problem, if you could give me some more details about exactly what you’re doing that would be really helpful.
For those interested, I have now also created a small extension to Alert called AlertPushover: it allows you to get notifications on your phone or browser from a remote Julia session.