@karmaniverous/jeeves-scripts-core
    Preparing search index...

    Function defineRunnable

    • Declare a runnable. Validates the declaration and returns it frozen; nothing runs until jeeves-scripts run <id> runs it.

      Type Parameters

      Parameters

      Returns JobModule

      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, ...).