commands – job 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 /examples/webhooks/random-user last hour
Result Time Run time Timestamp Code Output Message ------- -------------- -------- ------------- ---- ------ ------- SUCCESS Today 15:13:35 0.01 1465971215683 0 Yes SUCCESS Today 15:32:10 0.01 1465972330120 0 Yes SUCCESS Today 15:55:35 0.01 1465973735684 0 Yes
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
- job add
- job calendar
- job changes
- job command
- job condition
- job content
- job copy
- job delay
- job delete
- job description
- job diff
- job email
- job enable/disable/bypass
- job history
- job host
- job image
- job input
- job list
- job message
- job property
- job schedule
- job show
- job sql
- job start/kill
- job status
- job subject
- job timezone
- job trigger
- job url
- job user
- job variables