Skip to main content

Module to check whether you are online or not

Project description

pypi python implementation

docs license last-commit

donate follow

waitfornet

A stupid simple python module to check whether you are online or not

Synopsis

waitfornet is a stupid simple script, all it does is check whether you are online or not, and optionally wait until you go online.

On production servers, you don't need such a script because you are always online. But on home PCs or laptops, we plebeians aren't always online! We sometimes have to fiddle with our WiFi connections, we may have a wireless router but we forget to switch them on sometimes. What if I have a scheduled cron job to run at that moment such as this:

$> task1 && task2 && task3

The above won't work properly if the tasks are dependent on an internet connection. With waitfornet, you can do something like this:

$> waitfornet -w && task1 && task2 && task3

The first command will wait until you go online and once you do, it will exit and then your other crons can run!

Installation

pip install waitfornet

Usage

  -h, --help  show this help message and exit
  -w, --wait  Wait until online, keep trying

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for waitfornet, version 1.0.2
Filename, size File type Python version Upload date Hashes
Filename, size waitfornet-1.0.2.tar.gz (2.7 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page