nwd

Notify When Done (NWD). A tool for posting a desktop notification, E-mail, or other alert when a process finishes.


License
AGPL-3.0
Install
pip install nwd==2.1.0

Documentation

Notify When Done

Notify When Done (NWD) is a utility for triggering alerts when a process finishes. Kicking off a long-running compile? NWD can post a popup notification when it's done. Starting a job on a remote server? NWD can send you an e-mail when it's done. Want to run a custom script once another finishes? NWD can facilitate that, too.

Installation

pip3 install nwd

Examples

Post a desktop notification (the default behavior) when the process with PID 1337 finishes:

$ nwd 1337

Send an e-mail when cmake finishes:

$ nwd --name cmake --mode email

You will be prompted to enter SMTP credentials as well as the recipient's e-mail address. This can optionally be stored in the system keychain, and can be set in advance by running nwd --email-credentials.

List all notifications, and cancel an existing notification:

$ nwd --list
PID  |Name     |Started                 |Ended                   |Status
-----+---------+------------------------+------------------------+----------
55318|python3.7|Mon Dec  3 10:31:22 2018|Mon Dec  3 10:31:22 2018|FAILED
56020|clang    |Thu Nov 29 09:58:21 2018|Thu Nov 29 09:58:22 2018|NOTIFIED
34969|Python   |Mon Dec  3 10:32:05 2018|Mon Dec  3 10:32:05 2018|MONITORING
$ nwd --delete 34969
Deleted NWD daemon PID 34972 monitoring PID 34969

Run a command to monitor directly from NWD:

$ nwd --exec 'make -j4'

Execute a command when a process finishes:

$ nwd 1337 --run 'echo Process 1337 finished!'

Requirements

License

NWD is licensed and distributed under the AGPLv3 license. Contact us if you’re looking for an exception to the terms.