Import of the cronic script from http://habilis.net/cronic/