Browse Source

readme

tags/version-1.0
Vladimir Smagin 7 months ago
parent
commit
4b63bb5bc9
1 changed files with 89 additions and 0 deletions
  1. 89
    0
      readme.md

+ 89
- 0
readme.md View File

@@ -0,0 +1,89 @@
# 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

## 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
```

Loading…
Cancel
Save