Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

jkrup/pwatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

15 Commits

Repository files navigation

PWatch npm version

Get native notifications when your long running processes finish!

Running Database Migrations? Deploying apps? Compiling? Transfering large files? Get notified when your process has finished.

Install

Install it with yarn or npm:

$ npm install -g pwatch

Usage

Add pwatch at the end of your command.

 pwatch <pid | command>
 Commands:
 search [name] Lists all processes by PID that match "name"
 Examples:
 – Notifies after 10 seconds
 ${'$ sleep 10 | pwatch'.cyan}
 – See all PID for node related processes
 ${'$ pwatch search node'.cyan}
 – Notify me when process 4030 ends
 ${'$ pwatch 4030'.cyan}
 – Run a chained process in background with a &
 ${'$ sleep 10 | pwatch &'.cyan}

Examples

sleep 10 | pwatch

or

sleep 10 && pwatch

or

sleep 10; pwatch

Optionally add a & so pwatch runs in the background

sleep 10 | pwatch &

Or if you forget to call it when running your command

$ scp somelargefile.tar.gz root@remotehost:~
$ pwatch search scp
 60132 - 0:00.20 scp somelargefile.tar.gz root@remotehost:~
$ pwatch 60132

You can even use it to be notified upon SSH tunnel closing.

$ ssh root@remotehost
# in another shell...
$ ps aux | grep ssh
justink 60132 0.0 0.2 3041904 31712 s018 S+ 12:15PM 0:00.20 ssh root@remotehost
$ pwatch 60132

Then get notified when that process finishes.

About

Get Notifications When Processes / Jobs Complete

Topics

Resources

Stars

Watchers

Forks

Packages

Contributors

AltStyle によって変換されたページ (->オリジナル) /