Const
The pre-0.3.0 name of defineRunnable.
Declare a runnable. Validates the declaration and returns it frozen; nothing runs until jeeves-scripts run <id> runs it.
jeeves-scripts run <id>
export default defineRunnable({ id: 'acme-report', domain: 'acme', prerequisite: () => hasAcmeConfig() || 'no acme block in the instance config', flags: { live: argFlag('--live', 'Write changes (default: dry run)') }, run: async ({ flags }) => { await report(flags.live); },}); Copy
export default defineRunnable({ id: 'acme-report', domain: 'acme', prerequisite: () => hasAcmeConfig() || 'no acme block in the instance config', flags: { live: argFlag('--live', 'Write changes (default: dry run)') }, run: async ({ flags }) => { await report(flags.live); },});
When the declaration is invalid (bad id, missing run, ...).
run
Use defineRunnable; defineJob is removed in a later major release.
defineJob
The pre-0.3.0 name of defineRunnable.