Skip to content

fix: unify cron job commands and remove redundant path handling - #654

Merged
avoidwork merged 3 commits into
mainfrom
fix/cron-job-command-and-path
Jul 31, 2026
Merged

fix: unify cron job commands and remove redundant path handling#654
avoidwork merged 3 commits into
mainfrom
fix/cron-job-command-and-path

Conversation

@avoidwork

@avoidwork avoidwork commented Jul 31, 2026

Copy link
Copy Markdown
Owner

Description

Unify cron job command definitions across the codebase and remove redundant path handling. Replaces --chat with --message flag, removes hardcoded "run /reflection" strings, removes unnecessary node path replacement, and removes log redirection from prepareCrontabCommand.

Type of Change

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactor (no functional changes)
  • Performance improvement
  • CI / build / tooling

Testing

  • Updated tests/unit/scheduler/cron.test.js to reflect new prepareCrontabCommand behavior (no longer appends >> log redirection or replaces node with absolute path)
  • Updated tests/unit/autoSchedule.test.js to expect --message flag instead of "run /reflection"
  • All tests pass locally

Coverage

  • Line coverage maintained

Checklist

  • npm run lint passes
  • Tests pass with maintained line coverage
  • No forbidden patterns used
  • Conventional Commit style applied

@avoidwork avoidwork added the bug Something isn't working label Jul 31, 2026
@avoidwork avoidwork self-assigned this Jul 31, 2026
@avoidwork avoidwork added the bug Something isn't working label Jul 31, 2026
@avoidwork
avoidwork force-pushed the fix/cron-job-command-and-path branch 2 times, most recently from f97f098 to 9ccdc73 Compare July 31, 2026 00:15
- Replace --chat with --message flag across all cron job definitions
- Remove hardcoded 'run /reflection' in favor of --message
- Remove unnecessary node path replacement (node is in PATH)
- Remove log redirection (>>) from prepareCrontabCommand
- Update persisted reflection-daily.json to match new command format
- Update tests to reflect new prepareCrontabCommand behavior
- Read schedulesDir from config instead of hardcoding in autoSchedule.js
@avoidwork
avoidwork force-pushed the fix/cron-job-command-and-path branch from 9ccdc73 to 5f4b61c Compare July 31, 2026 00:34
@avoidwork
avoidwork merged commit 737a109 into main Jul 31, 2026
2 checks passed
@avoidwork
avoidwork deleted the fix/cron-job-command-and-path branch July 31, 2026 10:51
@avoidwork avoidwork mentioned this pull request Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant