Import/export

Whilst the BeyondCron allows for jobs to be created and modified interactively using the job panel, it also allows for groups of jobs to be imported and exported as JSON or YAML.

Importing

Import jobs from a json file into the group /example/webhooks.

BeyondCron % import /examples/webhooks /…/example-webhooks.json

Creating: + /examples/webhooks/critical-mass (Job) + /examples/webhooks/private-property (Job)

Implement changes (Yes/No): Yes

In order to avoid unexpected errors, BeyondCron will:

  • not update any existing jobs, unless specifically requested;
  • not create any jobs that are outside the specified group;
  • request confirmation of changes before implementing them.

Exporting

BeyondCron can export a single job, or group of jobs, to either the console, or a file.

Export job as YAML to the console

BeyondCron % export /examples/webhooks/critical-mass yaml

jobs: - name: /examples/webhooks/critical-mass description: San Francisco critical mass in 30 minutes type: URL mode: enabled timezone: US/Pacific schedules: - type: MONTHLY day: FRIDAY time: '17:00:00' last: true properties: - name: Content-Type value: application/json type: HEADER - name: text value: San Francisco critical mass in 30 minutes - name: username value: BeyondCron url: https://example.com/services/T065Z9...NdmZgX method: POST

Export a group of jobs as JSON to a file

BeyondCron % export /examples/webhooks /…/example-webhooks.json

Exported 2 Jobs.

See also