Get your bash scripts to sleep (halt execution) on Shippable and Travis

As I write this, it’s been about 36 hours without sleep for me — enough to relate to the importance of sleeping. However, this discussion is around getting a bash script or JavaScript on NodeJS to sleep for a specific duration.

#!/usr/bin/env bash

echo "Feeling drowsy...";
sleep 10;
echo "Woof! Back up after 10 seconds!";

The sleep command in unix allows one to pause execution of a script for a specified duration. It is a very handy tool in times where a script needs to wait for some other asynchronous work to complete. (Kindergarten talks for many!)

Continue reading “Get your bash scripts to sleep (halt execution) on Shippable and Travis”