Ask HN: Reminders for long-running shell jobs?
In my case these jobs are usually run via SSH, so programs that rely on a GUI aren't useful.
In my case these jobs are usually run via SSH, so programs that rely on a GUI aren't useful.
if you are running it via ssh you can do 'ssh zerocool@htp.org bash -s' < local_script.sh` and then do whatever you want to do afterwards
running things locally like make or tests i like to put `&& say done` at the end so i don't lose track of it.
If the task is already running, ctrl + z and run bg. Then i run `wait <pid> && slack 'job done' `
All you have to do is `$ my_long_running_job; telltg "Done"` and you get a notification on all your devices. Very handy also for remote jobs.
The best use case so far has been piping the udev log into it when my laptop is locked in a public place and I'm away. I get a notification on my phone when someone open/closes the lid, unplugs the charger, sticks a USB drive in and so on.
It's ugly to look at, but the idea is that you should never receive any logs, if you do, don't look at them but rather get your laptop in sight quickly because something is happening to it (I use it in the public library or such settings).
osascript -e 'display notification "that thing is done" with title "my awesome title"'
iTerm2 has a similar feature called Triggers [1].If it's unimportant, I'd probably just use a Slack webhook like pigpigs mentioned or a growl notification.
This way any long running process will bell when it is done and also show the runtime and cpu time of the process.
sleep 10 ; echo -e \\a
Don't forget to set your terminal to notify you on bell. For example putty can flash the task bar icon.