All Projects → bcicen → Tinycron

bcicen / Tinycron

Licence: mit
A very small replacement for cron

Programming Languages

go
31211 projects - #10 most used programming language

tinycron

A very small replacement for cron. Particularly useful within containers and for distributing cron tasks alongside a project as a standalone file.

Installing

curl -sLo tinycron https://github.com/bcicen/tinycron/releases/download/v0.3/tinycron-0.3-linux-amd64
sudo mv tinycron /usr/local/bin/
sudo chmod +x /usr/local/bin/tinycron

Usage

tinycron [expression] [command]

Tinycron can be conveniently used in your scripts interpreter line:

#!/usr/local/bin/tinycron */5 * * * * * * /bin/sh
echo "Current time: $(date)"

Or invoked directly via commandline:

$ tinycron '*/5 * * * * * *' /bin/echo hello

Expressions

Tinycron uses and supports expressions from the cronexpr library. Some examples:

  • @daily - run once daily, at midnight
  • * 15 * * * * * - run at minute :15 of every hour
  • */30 * * * * * * - run every 30 seconds

Config

TinyCron can be configured by setting the below environmental variables to a non-empty value:

Variable Description
TINYCRON_VERBOSE Enable verbose output
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].