How to create jobs and bridges on a chainlink node using CLI

Viewed 115

I am trying out all the CLI commands on a chainlink node. The main motivation is to execute these commands as bash scripts with chainlink node CLI. I have been unsuccessful in executing the two main commands which are as follows:

  • create a job on the node using chainlink jobs create --file
  • create a bridge to an external adapter using chainlink bridges create --file

I run the commands using the following syntax: docker exec -it chainlink /bin/bash -c "cmd1, cmd2"

I have created bridge.json and job.toml files and provide them with --file flag in the CLI commands. Also, I have tried positioning them in the root and in the chainlink directory and tried providing the JSON and TOML as raw input with the commands.

The errors I get are:

  • invalid JSON or file not found
  • Incorrect Usage: flag provided but not defined: -f with Error running app

Please help me with the correct syntax needed to create a job and bridge on a chainlink node using the CLI.

1 Answers

if you want to create jobs/bridges etc using files that contain the details of what you want to create, you use the syntax as follows. Note this will create a job using the TOML found in the a.toml file in the root of the chainlink node directory:

./chainlink jobs create a.toml
Related