Go Language scheduler
Scheduler that allow import and implementation of commands, it's more effective and it has more capabilities than the unix cron
daemon.
Command expose daemon, one-shot execution and client command line interface.
Command arguments are reported in following sections.
You can ask for help al all commands, and the specific execution arguments are explained.
go-cron help <command>
Available commands are:
help
: Help command line argumentsexplain
: Help explain command line arguments, for accessing to sample input or output formatsdaemon
: Execute the Scheduler as system daemon, in sync modeonce
: Execute the Scheduler as one-shot execution, in sync modeadd
: Add a new command in the scheduler and save it to the deviceremove
: Remove an existing command from the scheduler and save it to the deviceupdate
: Update an existing command into the scheduler and save it to the devicelist
: List command configurations in numerous different output formatsactive
: List active/running commands in numerous different output formatsnext
: List next execution of active commands in numerous different output formats
You can ask for input or output samples in numerous different output formats.
go-cron explain <command> [-arg0=value0] [-arg1=value1] ... [-argN=valueN]
Available commands are:
add
: Add a new command in the scheduler and save it to the deviceremove
: Remove an existing command from the scheduler and save it to the deviceupdate
: Update an existing command into the scheduler and save it to the devicelist
: List command configurations in numerous output formatsactive
: List active/running commands in numerous output formatsnext
: List next execution of active commands in numerous output formats
Optional command arguments [add
,remove
,update
]:
in-format
(string) - Encoding input format (text or file) [available:json
,xml
,yaml
]native-in
(bool) - Native GOB input (text or file) encoding format
Optional command arguments [list
,active
,next
]:
You can execute multiple commands calling appropriate parameters.
go-cron <command> [-arg0=value0] [-arg1=value1] ... [-argN=valueN]
Available commands are:
daemon
: Execute the Scheduler as system daemon, in sync modeonce
: Execute the Scheduler as one-shot execution, in sync modeadd
: Add a new command in the scheduler and save it to the deviceremove
: Remove an existing command from the scheduler and save it to the deviceupdate
: Update an existing command into the scheduler and save it to the devicelist
: List command configurations in numerous different output formatsactive
: List active/running commands in numerous different output formatsnext
: List next execution of active commands in numerous different output formats
Base command line arguments are:
format
(string) - Encoding file format [available:json
,xml
,yaml
]path
(string) - Configuration file locationsilent
(bool) - Execute less details output for command execution
Executes an asynchronous process in sync mode, accordingly to required base and specific arguments.
Specific command line arguments are:
no specific argument required
Executes a synchronous process, accordingly to required base and specific arguments.
Specific command line arguments are:
no specific argument required
Add a command to the scheduler, accordingly to required base (all mandatory arguments) and specific arguments.
go-cron add [-arg0=value0] [-arg1=value1] ... [-argN=valueN]
Specific command line arguments are:
in-format
(string) - Encoding input format (text or file) [available:json
,xml
,yaml
]native-in
(bool) - Native GOB input (text or file) encoding formatin-file
(string) - Input file absolute pathin-text
(sting) - Input text valueout-format
(string) - Encoding output format [available:text
,json
,xml
,yaml
]native-out
(bool) - Native GOB output encoding format
Remove an existing command in the scheduler at a specific index or in range of indexes, accordingly to required base (all mandatory arguments) and specific arguments. Index is the line number of the list
command.
go-cron remove [-arg0=value0] [-arg1=value1] ... [-argN=valueN]
Specific command line arguments are:
index
(int) - Output list raw line number to be deleted (1..n)from
(int) - Output list raw first line number to be deleted (1..n)to
(int) - Output list raw last line number to be deleted (1..n)out-format
(string) - Encoding output format [available:text
,json
,xml
,yaml
]native-out
(bool) - Native GOB output encoding format
Update an existing command in the scheduler at a specific index, accordingly to required base (all mandatory arguments) and specific arguments. Index is the line number of the list
command.
go-cron update [-arg0=value0] [-arg1=value1] ... [-argN=valueN]
Specific command line arguments are:
index
(int) - Output list raw line number to be deleted (1..n)in-format
(string) - Encoding input format (text or file) [available:json
,xml
,yaml
]native-in
(bool) - Native GOB input (text or file) encoding formatin-file
(string) - Input file absolute pathin-text
(sting) - Input text valueout-format
(string) - Encoding output format [available:text
,json
,xml
,yaml
]native-out
(bool) - Native GOB output encoding format
Show the list of saved or cached command configurations with base (all mandatory arguments) and specific arguments, in numerous output encoding format.
go-cron list [-arg0=value0] [-arg1=value1] ... [-argN=valueN]
Specific command line arguments are:
query
(sting) - Comma separated column_name=value key pairs (not implemented)filter
(sting) - Go style template output filter template text (not implemented)filter-file
(sting) - Go style template output filter template template (not implemented)details
(bool) - Show detailed output formatout-format
(string) - Encoding output format [available:text
,json
,xml
,yaml
]native-out
(bool) - Native GOB output encoding format
Show the list of active/running command execution data with base (all mandatory arguments) and specific arguments, in numerous output encoding format.
go-cron active [-arg0=value0] [-arg1=value1] ... [-argN=valueN]
Specific command line arguments are:
query
(sting) - Comma separated column_name=value key pairs (not implemented)filter
(sting) - Go style template output filter template text (not implemented)filter-file
(sting) - Go style template output filter template template (not implemented)details
(bool) - Show detailed output formatout-format
(string) - Encoding output format [available:text
,json
,xml
,yaml
]native-out
(bool) - Native GOB output encoding format
Show the list of next running command execution data with base (all mandatory arguments) and specific arguments, in numerous output encoding format.
go-cron next [-arg0=value0] [-arg1=value1] ... [-argN=valueN]
Specific command line arguments are:
query
(sting) - Comma separated column_name=value key pairs (not implemented)filter
(sting) - Go style template output filter template text (not implemented)filter-file
(sting) - Go style template output filter template template (not implemented)details
(bool) - Show detailed output formatout-format
(string) - Encoding output format [available:text
,json
,xml
,yaml
]native-out
(bool) - Native GOB output encoding format
Installation and build procedures are reported in following sections.
Build command :
go build -buildmode=exe github.com/hellgate75/go-cron/
Install locally the command :
go get -u github.com/hellgate75/go-cron/
Here list of known implementing repositories:
-
Synapses AI - Synapse AI open source project
-
Go-Peer-Cluster - Peer-to-Peer auto-gossip and auto-grouping Cluster-ware library
Enjoy the experience.
The library is licensed with LGPL v. 3.0 clauses, with prior authorization of author before any production or commercial use. Use of this library or any extension is prohibited due to high risk of damages due to improper use. No warranty is provided for improper or unauthorized use of this library or any implementation.
Any request can be prompted to the author Fabrizio Torelli at the following email address: