Get a sound notification when your long-lasting script completes 🔔

Never again miss the moment when your long-lasting script in the background completes, thanks to sound notifications! While the script is running, you can safely switch to an other task 🧑‍💻 or take a break ☕️, being sure you won’t forget to check scrip…

Never again miss the moment when your long-lasting script in the background completes, thanks to sound notifications! While the script is running, you can safely switch to an other task 🧑‍💻 or take a break ☕️, being sure you won’t forget to check script’s results at the right time.

Speach-synthesized message

$ npm build && say „Build succeeded!” || say „Build failed!”

On MacOS you can use the command ‘say’ for the speach synthesis via the CLI. With the help of operators && and || you can set a different message for a build success and failure.

Note: there seem to exist equivalent commands to ‘say’ on other operating systems: ptts on Windows and espeak on Linux (which may differ a bit in syntax), however I didn’t try them.

Feel less frustrated

In the past I used to either stare a few minutes at the terminal waiting for the script to complete (which drained my energy and focus capabilities) or switch to an other task, eventually forgetting about the running script in the background. It was the most frustrating, was when I figured out the build failed. And it failed very early, just after I switched to an other task.

Be more productive

Sound notifications really helped me to be more productive while fixing bugs which required from me re-building an app many times a day. Especially when it was a long-lasting production build of a big Angular SSR application.

PS. For fun, you can customize the messages 😁, e.g.:

$ npm build && say „This is Sparta!” || say „Build failed. Get back, you lazybones!”

Print Share Comment Cite Upload Translate
APA
Krzysztof Platis | Sciencx (2024-03-29T10:31:07+00:00) » Get a sound notification when your long-lasting script completes 🔔. Retrieved from https://www.scien.cx/2022/11/24/get-a-sound-notification-when-your-long-lasting-script-completes-%f0%9f%94%94/.
MLA
" » Get a sound notification when your long-lasting script completes 🔔." Krzysztof Platis | Sciencx - Thursday November 24, 2022, https://www.scien.cx/2022/11/24/get-a-sound-notification-when-your-long-lasting-script-completes-%f0%9f%94%94/
HARVARD
Krzysztof Platis | Sciencx Thursday November 24, 2022 » Get a sound notification when your long-lasting script completes 🔔., viewed 2024-03-29T10:31:07+00:00,<https://www.scien.cx/2022/11/24/get-a-sound-notification-when-your-long-lasting-script-completes-%f0%9f%94%94/>
VANCOUVER
Krzysztof Platis | Sciencx - » Get a sound notification when your long-lasting script completes 🔔. [Internet]. [Accessed 2024-03-29T10:31:07+00:00]. Available from: https://www.scien.cx/2022/11/24/get-a-sound-notification-when-your-long-lasting-script-completes-%f0%9f%94%94/
CHICAGO
" » Get a sound notification when your long-lasting script completes 🔔." Krzysztof Platis | Sciencx - Accessed 2024-03-29T10:31:07+00:00. https://www.scien.cx/2022/11/24/get-a-sound-notification-when-your-long-lasting-script-completes-%f0%9f%94%94/
IEEE
" » Get a sound notification when your long-lasting script completes 🔔." Krzysztof Platis | Sciencx [Online]. Available: https://www.scien.cx/2022/11/24/get-a-sound-notification-when-your-long-lasting-script-completes-%f0%9f%94%94/. [Accessed: 2024-03-29T10:31:07+00:00]
rf:citation
» Get a sound notification when your long-lasting script completes 🔔 | Krzysztof Platis | Sciencx | https://www.scien.cx/2022/11/24/get-a-sound-notification-when-your-long-lasting-script-completes-%f0%9f%94%94/ | 2024-03-29T10:31:07+00:00
https://github.com/addpipe/simple-recorderjs-demo