bc-clijob command

Set the command that a job will execute on the jobs’ host.


job command name command [args]

name of job whose command to set.
command to execute. See variables for available variables that can be included.
args Optional command arguments.
automatic environment variables

BeyondCron automatically sets the following environment variable upon job execution:

PATH Default = /usr/local/bin:/usr/bin:/bin, unless overridden by the bc-agent environment variable BEYONDCRON_ENVIRONMENT_PATH, or a PATH job property.
TZ Timezone of job, unless overridden by a TZ job property.

write on name

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

this command will set the job type to command, if the job is not a container job.


Set a command

BeyondCron % job command /examples/server/reboot reboot
BeyondCron % job list full reboot

----------- ----------------------- Name /examples/server/reboot Description Weekly reboot ... Command reboot ...

Set a command with arguments

BeyondCron % job command /examples/server/backup tmutil startbackup --block
BeyondCron % job list full backup

----------- -------------------------- Name /examples/server/backup Description Business day backup ... Command tmutil startbackup --block ...

Set a command with a variable argument

BeyondCron % job command /examples/variables/calendar /usr/bin/cal -m {{ date MM }}
BeyondCron % job list full calendar

----------- ----------------------------- Name /examples/variables calendar Description Print calendar for this month ... Command /usr/bin/cal -m {{ date MM }} ...

See also