commandsjob output

Set/clear the output file for a job, or print the output of a job.

Usage

job output clear name
job output set name path
job output name [timestamp]

where
clear the job specific output file, and use the default of {{ dir.tmp }}/beycondcron.{{ job.name encode }}.log instead.
set a job specific output file.
name of job whose output file to set/clear, or whose output to print.
path output file path. This file will be written on the host that executed the job command, or in the case of urls, the bc-agent that called the url. See variables that can be included.
timestamp of job execution to output. Default = timestamp of last execution.

to get a specific timestamp use job history.

read on job

Examples

List output of the last execution of a job

BeyondCron % job output /examples/webhooks/random-user

results: - gender: female name: title: mrs first: storm last: 'de boom' nat: NL

List the output from an execution about an hour ago

BeyondCron % job history full /examples/webhooks/random-user last hour

Timestamp Start time Run time Trigger Result Code ... ------------- ------------------------ ------------ -------- ------- ---- ... 1465971215683 22/05/2025 11:30:28 AEST 00:00:00.421 Schedule Success 200 ... 1465972330120 22/05/2025 11:35:28 AEST 00:00:00.311 Schedule Success 200 ... 1465973735684 22/05/2025 11:40:28 AEST 00:00:00.319 Schedule Success 200 ...

BeyondCron % job output $$ 1465971215683

results: - gender: male name: title: mr first: lucas last: marshall nat: US

Set job specific output file

Save the output of a job to a specific folder, and include the date and time, as well as its type in the name.

BeyondCron % job output set /examples/webhooks/random-user \
  /var/opt/random/person-{{ time yyyyMMdd-HHmmss }}.yaml

BeyondCron % job show $$

----------- -------------------------------------------------- Name /examples/webhooks/random-user Description Generate a random user ... Output /var/opt/random/user-{{ time yyyyMMdd-HHmmss }}.yaml ...

Clear a job specific output file

BeyondCron % job output clear /examples/webhooks/random-user
BeyondCron % job show $$

----------- ------------------------------ Name /examples/webhooks/random-user Description Generate a random user ... Output ...

See also