bc-cli

Command line interface for creating and managing BeyondCron jobs.

Usage

bc-cli [--cluster name] [--admin | --user name] [server][:port] ... bc-cli --command command bc-cli --version bc-cli --help

where
--cluster name of BeyondCron cluster to to connect to. Default is beyondcron.
--admin login as the admin user.
--user name name of user to login as. Default is user executing command.
server server name/s within the cluster. Default is name returned by /bin/hostname.
port server port number. Default is 5701, the value of the enviornment variable BEYONDCRON_SERVER_PORT.
--command command execute a single command. Returns 0 on success, 1 otherwise.
--version print the command version.
--help print the command options.

in order to login as the admin user, this command must be executed on the same server as the BeyondCron server, using the same operating system user id.

Commands

Environment variables

BEYONDCRON_CHECK_HOSTS_EXIST check that command job hosts exist. Default is true.
BEYONDCRON_CLUSTER_NAME name of BeyondCron cluster to join.
BEYONDCRON_CLUSTER_PASSWORD password of cluster. If password is in the format file:filename, then the password will be read from filename. Default is a cluster specific random string.
BEYONDCRON_USER_NAME name of user to login as.
BEYONDCRON_USER_PASSWORD password of user. If password is in the format file:filename, then the password will be read from filename.
BEYONDCRON_SERVER_NAMES one or more space separated server[:port]s to connect to.
BEYONDCRON_SERVER_PORT the server port number. Default is 5701.
BEYONDCRON_TIME_ZONE default timezone.
JAVA_OPTS one or more JVM options. e.g. -Xms2T -Xmx2M

where a parameter is defined on both the command line and as an environment variable, the command line value will be used.

Examples

Start and interactive session

user1@server1% bc-cli

bc-cli 2.0.160707 Copyright (C) 2016 BeyondCron. All rights reserved.

user1’s password: ••••••••
BeyondCron % job start /examples/webhooks/random-person
BeyondCron %

Execute a single command

user1@server1% export BEYONDCRON_USER_PASSWORD=secret
user1@server1% bc-cli —command job start /examples/webhooks/random-person
user1@server1% echo $?

0

user1@server1%

Installation

See also