commandsjob input

Set the input to send a command jobs command.

Usage

job input (add|set) name text
job input clear name

where
add a line of input.
set the jobs input, replacing any previously defined input.
clear a jobs input.
name of job whose input to add/set/clear.
text line of input to add/set. See variables for available variables that can be included.

no input

write on name

command, host & user for setting the command jobs’ command, host and user.

this command will set the job type to command.

Examples

Define a simple script

BeyondCron % job input set /examples/scripts/random.sh expr $RANDOM % 2 > /dev/null
BeyondCron % job show $$

----------- ---------------------------------- Name /examples/scripts/random.sh Description Randomly return success or failure ... Command /bin/bash Input expr $RANDOM % 2 > /dev/null ...

Define a multi-line script which includes BeyondCron variables

BeyondCron % job input set /examples/scripts/random.py import random
BeyondCron % job input add $$ code = random.randint(0,1)
BeyondCron %
BeyondCron % job show $$

----------- ------------------------------------------ Name /examples/scripts/random.py Description Randomly return success or failure ... Command /usr/bin/python Input import random code = random.randint(0,1) if code == 0: print "Success - {{ time }}" else: print "Failed - {{ time }}" exit(code) ... Properties time: {{ time HH:MM:ss }}

See also