Cron with interval 1 second, yaml based configs http://gogocron.blindage.org/
go
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Vladimir Smagin a2158a408d readme and redirect page for landing 8 months ago
configs final fixes 8 months ago
debian build debian package 8 months ago
website readme and redirect page for landing 8 months ago
.gitignore build debian package 8 months ago
build.sh build debian package 8 months ago
config.go final fixes 8 months ago
cron.go #3 Search integer and array of integers in cronValue 8 months ago
file_utils.go commenting code 8 months ago
gogocron.go final fixes 8 months ago
readme.md readme and redirect page for landing 8 months ago

readme.md

gogocron - one second crontab daemon

Visit http://gogocron.blindage.org to be redirected back here :) You can find binary code in Releases tab or build code yourself.

Requires

  • root user privileges
  • available su command in $PATH

Features

  • 1 second minimal interval
  • 10 ms precision
  • run command as other user
  • batch of commands
  • timeout for whole task
  • your own ENV variables
  • traditional crontab syntax
  • SIGHUP process to reload config files

Build code yourself

This is a Go code. Install required libraries and build:

go get github.com/kr/pty
go get gopkg.in/yaml.v2
go build

Interval

Use traditional crontab syntax

runsecond // second
runminute // minute
runhour   // hour
rundom    // day of month
runmonth  // month
rundow    // day of week

Timeout

  • 1s - one second
  • 1m10s - one minute and 10 seconds
timeout: 3h12m4s

ENV variables

Syntax:

env:
  - TESTVAR="test variable"

Commands

Syntax:

commands: 
  - whoami
  - sleep 3
  - head -c 20 /dev/urandom |base64
  - ls
  - echo $TESTVAR

Sample config file

---
name: "Print base64 of 20 random symbols"
runsecond: "*/5"
timeout: 10s
user: vlad
env:
  - TESTVAR="test variable"
commands: 
  - whoami
  - sleep 3
  - head -c 20 /dev/urandom |base64
  - ls
  - echo $TESTVAR