GGS (Grey Goo Spawner) is a simple software that runs jobs
periodically. It is similar with cron, but with some differences :
cronlaunches jobs at specific times,
ggsis mainly interested in intervals. It will run all jobs at its startup and then will re-run each job after a certain delay has passed.
ggshas a system of
workers, similar to many servers (like nginx or Apache with MPM Workers) to limit ressource concurrency between your jobs .
You can define a timeout for your jobs, too.
ggs [options] [configuration file]
If no configuration file is provided,
ggs will use
go build ggs.go && cp ggs /usr/local/bin
Configuration file is a shell script, so same rule as
You create a job with the
command function, which takes two arguments:
the delay between launches, and the command to run. You can specify a
timeout (in seconds) by setting the
timeout environnement variable
(optional, default: 0 no timeout).
timeout=30 command 300 "uptime | mail email@example.com" command 5 'ping -c 1 github.com || sudo halt -p'
You can also set the number of workers (maximum number of jobs that can run simultaneously):
workers=5 #Warning: dont do "workers = 5", spaces matters here !
The configuration file is just a shell script which produces a JSON
document which maches the structure of the
Config structure. You can do
exec my_script to produce the same JSON with a script in your favorite
language. You can also use variables, functions, execute external
commands, and so on...