v2 Jobs
What is a Job?
Chainlink nodes require jobs to do anything useful. For example, posting asset price data onchain requires jobs. Chainlink nodes support the following job types:
blockhashstoreblockheaderfeederbootstrap(requiresOCR2.Enabled = true)ccip(requiresOCR2.Enabled = true)ccvcommitteeverifierccvexecutorcresettingscrongatewayoffchainreporting(requiresOCR.Enabled = true)offchainreporting2(requiresOCR2.Enabled = true)standardcapabilitiesstreamvrf
The following job types are no longer supported. A spec that uses one of them does not start:
directrequestfluxmonitorkeeperworkflowwebhook
Jobs are represented by TOML specifications.
Example v2 job spec
The following is an example cron job spec. This is a simple spec that you can add to a node:
type = "cron"
schemaVersion = 1
schedule = "CRON_TZ=UTC 0 0 1 1 *"
# Optional externalJobID: Automatically generated if unspecified
# externalJobID = "0EEC7E1D-D0D2-476C-A1A8-72DFB6633F46"
observationSource = """
ds [type="http" method=GET url="https://chain.link/ETH-USD"];
ds_parse [type="jsonparse" path="data,price"];
ds_multiply [type="multiply" times=100];
ds -> ds_parse -> ds_multiply;
"""
Shared fields
Every job type supported by a node shares the following TOML fields:
name: The name of the job in the Operator UItype: Specifies the v2 job type, which can be one of the following:blockhashstoreblockheaderfeederbootstrapccipccvcommitteeverifierccvexecutorcresettingscrongatewayoffchainreportingoffchainreporting2standardcapabilitiesstreamvrf
schemaVersion: Must be present and set to a value of1. This field will handle progressive iterations of the job spec format gracefully with backwards-compatibility.observationSource: The v2 pipeline task DAG, which is specified in DOT syntax. See below for information on writing pipeline DAGs.maxTaskDuration: The default maximum duration that any task is allowed to run. If the duration is exceeded, the task is errored. This value can be overridden on a per-task basis using thetimeoutattribute. See the Shared attributes section for details.externalJobID: An optional way for a user to deterministically provide the ID of a job. The ID must be unique. For example, you can run the samecronjob on two different Chainlink nodes and use the sameexternalJobIDon both. The spec contents can differ, but theexternalJobIDidentifies the job on either node. If you do not provide anexternalJobID, the node generates the ID for you.gasLimit: Optional gas limit for any outgoing transactions spawned by this job. When specified, it overridesEVM.GasEstimator.LimitJobTypefor the job's type, andEVM.GasEstimator.LimitDefaultwhen no job-type limit is set.forwardingAllowed: Optional. Whentrue, it allows forwarding transactions submitted by the job.