I'm running a long running custom nodejs script and would like to be notified when the script is completed.
How do I make nodejs trigger the "System Bell"?
Join Stack Overflow to learn, share knowledge, and build your career.
I'm running a long running custom nodejs script and would like to be notified when the script is completed.
How do I make nodejs trigger the "System Bell"?
Output the BELL character (Unicode 0007) to the standard output.
console.log('\u0007');
References
The console.log('\u0007') didn't work for me running VSCode on windows 10. The following code did work:
import { exec } from 'child_process'
exec(`rundll32 user32.dll,MessageBeep`)
console.log
version worked for me, it did not work after building an electron app with the code. Your solution also works for electron apps on windows 10.
– messerbill
Dec 7 '20 at 20:13
console.log('\u0007');
– wulong Dec 19 '11 at 6:02