Whilst the BeyondCron allows for jobs to be created and modified interactively using the job window, 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;
  • will 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 mins type: URL mode: ENABLED timeZone: US/Pacific schedules: - type: MONTHLY day: FRIDAY time: '17:00:00' last: true properties: - {name: jobName, value: /examples/webhooks/critical-mass} - {name: jobDescription, value: San Francisco critical mass in 30 mins} url: https://hooks.slack.com/services/T052K944E/B077HCJF7/fSMqAZpfirT.......yNdmZgX method: JSON

Export a group of jobs as JSON to a file

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

Exported 2 Jobs.

See also