Sometimes, when I have a long running process on my computer, like scp
, rsync
or curl
I need to know when it’s done, so I don’t check the terminal every minute. That’s when I realized that this is a perfect fit for Apple Script and pwait
.
Basically, it looks something like this:
pwait `pgrep xargs` \
&& osascript -e \
'display notification "Extraction Done" with title "large xargs"'
Now I can go back to work, and I don’t have to check if the job is done every minute. A notification will appear when it’s done.
For remote jobs, I have realized, that I can send a notification to myself, kind of like a self-hosted Pushover, using XMPP, I don’t want to go into the details, but that seems like to be a good solution as well. Maybe I should just use Pushover anyway.