# Send notification my server when computation is done

**URL:** <https://discourse.julialang.org/t/send-notification-my-server-when-computation-is-done/129142>\
**Category:** Tooling\
**Tags:** question\
**Created:** [May 19, 2025, 11:41am UTC](https://discourse.julialang.org/t/send-notification-my-server-when-computation-is-done/129142 "2025-05-19T11:41:00Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [May 19, 2025, 11:41am UTC](https://discourse.julialang.org/t/send-notification-my-server-when-computation-is-done/129142/1 "2025-05-19T11:41:00Z")

</div>

I am running a Julia computation on a server that takes days, but the exact amount of time is unpredictable in advance. I would like to be notified when the computation finishes, either correctly or with an error (so I could log in and debug). Ideally by e-mail, but other options are viable.

I can compile binaries on the server in my home directory.

E-mail used to be easy, with `msmtp` etc. But now most providers require OAUTH2 which is a PITA to set up.

I tried the [glab](https://docs.gitlab.com/editor_extensions/gitlab_cli/) client, thinking that because the project is managed on Gitlab and I work in branches, I could just do

```sh
glab mr note -m "hey your computation is done" 

```

and get an e-mail. But since it is created under _my_ account, I am not notified.

Signal has a CLI client so I could DM myself. But then this would require authenticating with my full credentials on a server I do not control, so it is a last resort.

Any possibility I didn’t think of?

**clarification** the server does not have an MTA configured, or an MX domain.

---

<div class="post-metadata">

**Author:** ![Sukera](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Sukera](https://discourse.julialang.org/u/Sukera)\
**Post date:** [May 19, 2025, 11:44am UTC](https://discourse.julialang.org/t/send-notification-my-server-when-computation-is-done/129142/2 "2025-05-19T11:44:22Z")

</div>

Do you have some other server you do control? If so, a simple HTTPS POST with Basic Authentication would be plenty, since those credentials are not very critical. On that server you can then also do some more elaborate email/signal/other messaging scheme for yourself.

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [May 19, 2025, 11:48am UTC](https://discourse.julialang.org/t/send-notification-my-server-when-computation-is-done/129142/3 "2025-05-19T11:48:30Z")

</div>

Maybe

> **[GitHub - Arkoniak/Telegram.jl: Native Julia Telegram bot api wrapper](https://github.com/Arkoniak/Telegram.jl)**
>
> Native Julia Telegram bot api wrapper

as a Signal alternative - you could have a throwaway account for this?

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [May 19, 2025, 11:54am UTC](https://discourse.julialang.org/t/send-notification-my-server-when-computation-is-done/129142/4 "2025-05-19T11:54:35Z")

</div>

> [@Sukera](#):
>
> a simple HTTPS POST

Can you elaborate on how this works? Would this require that the web server (eg apache2) executes some command? How can I configure this?

---

<div class="post-metadata">

**Author:** ![sylvaticus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sylvaticus/32/203883_2.png) [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Post date:** [May 19, 2025, 12:01pm UTC](https://discourse.julialang.org/t/send-notification-my-server-when-computation-is-done/129142/5 "2025-05-19T12:01:59Z")

</div>

If you have sendmail/postfix available on the server, something on the lines of :

```julia
function send_an_email(msgBody)
  message = """
          To: me@mydomain.org
          From: "My server" <no-reply@myserver.org>
          Subject: Debug email from running xyz

          $(msgBody)"""
  sendEmailCmd = pipeline(IOBuffer(message), `sendmail -t`)
  outcode = run(sendEmailCmd).exitcode
end

```

The trick part is that most receiving email providers will now check if the IP of the server is authorized for sending emails in name of `myserver.org`, and this requires setting a TXT record on the DNS of `myserver.org`…

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [May 19, 2025, 12:02pm UTC](https://discourse.julialang.org/t/send-notification-my-server-when-computation-is-done/129142/6 "2025-05-19T12:02:57Z")

</div>

Sorry, I should have mentioned: no MTA is available. That would of course make the solution obvious.

---

<div class="post-metadata">

**Author:** ![Sukera](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Sukera](https://discourse.julialang.org/u/Sukera)\
**Post date:** [May 19, 2025, 12:29pm UTC](https://discourse.julialang.org/t/send-notification-my-server-when-computation-is-done/129142/7 "2025-05-19T12:29:03Z")

</div>

> [@Tamas\_Papp](#):
>
> Can you elaborate on how this works? Would this require that the web server (eg apache2) executes some command?

In essence, yes. I don’t know if apache2 or nginx can do this out of the box, but if you already control the server, you can likely hook something up with HTTP.jl too, triggering the sending of some email or use the signal CLI from your secure server. I have not used it myself, but perhaps [GitHub - binwiederhier/ntfy: Send push notifications to your phone or desktop using PUT/POST](https://github.com/binwiederhier/ntfy) would work for you? You can also host that yourself.

It’s unfortunate how the web has evolved - this kind of stuff used to be much easier to do with things like Yahoo Pipes..

---

<div class="post-metadata">

**Author:** ![slumpy](https://avatars.discourse-cdn.com/v4/letter/s/a88e4f/32.png) [@slumpy](https://discourse.julialang.org/u/slumpy)\
**Post date:** [May 21, 2025, 3:17am UTC](https://discourse.julialang.org/t/send-notification-my-server-when-computation-is-done/129142/8 "2025-05-21T03:17:20Z")

</div>

ntfy.sh works pretty well, im using it for a similar usecase. 0 setup - you can install an app on your phone or get notifications through a browser tab. i think cli might be possible as well. to send the notification is just a simple curl request. channels are public - there is no authentication or authorization.

ive used telegram in the past as well and its also pretty simple - essentially a oneliner if you use a library.

simplex has a commandline client and nostr as well and neither requires an “identity”.

if you strictly need mail, most providers let you make an app specific password.

if all else fails and you need mail to to an account you control, there are services like eg ifttt, zapier, GH actions and MS automate that can provide a webhook (url endpoint you can make requests to) that trigger emails

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [May 21, 2025, 8:38am UTC](https://discourse.julialang.org/t/send-notification-my-server-when-computation-is-done/129142/9 "2025-05-21T08:38:17Z")

</div>

Thanks @Sukera and @slumpy, I tried ntfy.sh and it works great. I generated a 20-letter random string for the “topic”, which for this purpose I guess is as good as a password-protected channel.
