zeroecco / bash-wrapper

a simple bash wrapper to run any command you want in cron

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

endorse

bash-wrapper

a simple bash wrapper to run any command you want in cron

What it does

  1. Adds basic logging for the cron job - default is '/var/log/shell_wrapper.log'
  2. Ensures that the command is not run at the same time via lock file - '/tmp/shell_wrapper.lock'
  3. Ensures that if the command exited in non-zero, it will reset and re-run on the next cron run.

Usage

wrapper.sh -c 'COMMAND' << SINGLE QUOTES ARE NECESSARY!!!

Why

I have had to re-write cron wrappers so many freaking times that I am sick of it. This tool is to be the end all to a cron wrapper.

TODO

TDD is not done at this time. Need to find a framework that works well with bash

About

a simple bash wrapper to run any command you want in cron

License:GNU General Public License v3.0


Languages

Language:Shell 100.0%