Skip to content

cron tasks report Status: enabled when the daemon cannot run (pm2 missing), so they silently never fire #75

Description

@Esturban

Version: 2.0.1 (reproduced on 1.0.4 and again after upgrading to 2.0.1)
Platform: macOS, npm global install

Problem

openwolf daemon start starts the scheduler via pm2. When pm2 is not installed the daemon cannot start, so no cron task ever executes. But openwolf cron list still reports every task as Status: enabled, and nothing anywhere says the scheduler is unavailable.

The result is a task that displays identically to a working one and will never fire:

  Consolidate old memory (memory-consolidation)
    Schedule: 0 2 * * *
    Status: enabled
    Last run: never

Status: enabled alongside Last run: never reads as "scheduled and waiting for its first window", not "cannot run at all". In our case tasks sat in this state for weeks and our own documentation described them as live automation, because the CLI said enabled and nothing contradicted it.

openwolf status does not help either. Its help text says it shows daemon health, but with pm2 absent it prints hook and token stats and emits no warning about the daemon.

Expected

Any one of these would close the gap:

  1. cron list reports scheduler availability, e.g. Status: enabled (scheduler unavailable: pm2 not installed).
  2. openwolf status warns when the daemon cannot run.
  3. Last run: never combined with a schedule whose window has already passed is surfaced as a warning rather than plain text.

A task that cannot fire should not render the same as one that will.

Reproduce

  1. Ensure pm2 is not installed (command -v pm2 returns nothing).
  2. openwolf init in any project.
  3. openwolf cron list.
  4. Observe Status: enabled and Last run: never with no indication that no scheduler exists.
  5. openwolf status and observe no daemon warning.

Two smaller gaps found alongside

  • There is no openwolf daemon status. daemon exposes only start, stop, restart, logs, so there is no way to ask whether the daemon is currently running.
  • There is no openwolf cron enable|disable <id>. cron exposes only list, run, retry. Disabling a task requires hand editing .wolf/cron-manifest.json, which is easy to get wrong and is not discoverable.

Happy to send a PR for the cron list availability check if that shape is welcome.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions