Browse Source

readme

tags/version-1.0
Vladimir Smagin 2 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 @@
1
+# gogocron - one second crontab daemon
2
+
3
+Visit http://gogocron.blindage.org to be redirected back here :) You can find binary code in Releases tab or build code yourself.
4
+ 
5
+## Requires
6
+
7
+ - root user privileges
8
+ - available su command in $PATH
9
+
10
+## Features
11
+
12
+ - 1 second minimal interval
13
+ - 10 ms precision
14
+ - run command as other user
15
+ - batch of commands
16
+ - timeout for whole task
17
+ - your own ENV variables
18
+ - traditional crontab syntax
19
+
20
+## Build code yourself
21
+
22
+This is a Go code. Install required libraries and build:
23
+
24
+```
25
+go get github.com/kr/pty
26
+go get gopkg.in/yaml.v2
27
+go build
28
+```
29
+
30
+## Interval
31
+
32
+Use traditional crontab syntax
33
+
34
+```
35
+runsecond // second
36
+runminute // minute
37
+runhour   // hour
38
+rundom    // day of month
39
+runmonth  // month
40
+rundow    // day of week
41
+```
42
+
43
+## Timeout
44
+
45
+ - 1s - one second
46
+ - 1m10s - one minute and 10 seconds
47
+
48
+```
49
+timeout: 3h12m4s
50
+```
51
+
52
+## ENV variables
53
+
54
+Syntax:
55
+```
56
+env:
57
+  - TESTVAR="test variable"
58
+```
59
+
60
+## Commands
61
+
62
+Syntax:
63
+
64
+```
65
+commands: 
66
+  - whoami
67
+  - sleep 3
68
+  - head -c 20 /dev/urandom |base64
69
+  - ls
70
+  - echo $TESTVAR
71
+```
72
+
73
+## Sample config file
74
+
75
+```
76
+---
77
+name: "Print base64 of 20 random symbols"
78
+runsecond: "*/5"
79
+timeout: 10s
80
+user: vlad
81
+env:
82
+  - TESTVAR="test variable"
83
+commands: 
84
+  - whoami
85
+  - sleep 3
86
+  - head -c 20 /dev/urandom |base64
87
+  - ls
88
+  - echo $TESTVAR
89
+```

Loading…
Cancel
Save