Git Product home page Git Product logo

snotify's Introduction

snotify

Get text messages/email alerts when your Deepthought2 jobs finish running.

⚠️ Warning ⚠️

This program runs in the background on the login node, and is alive until your job has finished running. Because this duration may be long, it could potentially violate the HPC usage policy concerning login node usage. Be warned: if you decide to run this program, it will be at your own risk.

Getting started

Somewhere in your Deepthought2 space, clone this repository, build the C program, and add it to PATH:

bash
git clone https://www.github.com/hsirkar/snotify
cd snotify
make
export PATH=$PATH:$(pwd)

Usage

First, run your submission script.

> sbatch submit.sh
Submitted batch job 12345678

To get an email when job 12345678 completes:

snotify -j 12345678 -e [email protected]

To get a text message:

snotify -j 12345678 -p 3285550156 -c verizon

Supported carriers (not all tested):

  • att
  • sprint
  • tmobile
  • verizon
  • boost
  • cricket
  • ting
  • virgin
  • uscellular
  • straighttalk
  • metropcs

Testing

If you want to verify that snotify works for your email or phone, you can test with the provided hello-world program:

cd test
make
sbatch submit.sh
snotify -j <job-id> -e <email> | -p <phone> -c <carrier>

How it works

snotify runs in the background and listens for changes to squeue. If it sees that your job id is no longer in the queue, it sends you an email/text notification saying your job is complete, and terminates.

Most cell carriers provide a gateway that lets you text a number by sending an email. This is what snotify uses to send text messages, and this is why the carrier needs to be known.

Contributing

I literally wrote this in one day, so I'm sure it's full of bugs. If you can fix something or want to add a feature, then feel free to send a PR. Contributions are absolutely welcome!

Disclaimer

The code is still in alpha and not everything has been tested. If this program causes anything to break or go wrong, then I'm not responsible for anything. If you need to terminate it, use ps -xj | grep snotify to get the process id, and then pkill it.

Good luck with your projects!

snotify's People

Contributors

hsirkar avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.