tinycron

command module
v0.0.0-...-ebc169f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 7 Imported by: 0

README

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

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL