claude-workflows.cron
1 # Claude Workflow Cron Jobs 2 # Install with: crontab claude-workflows.cron 3 # Or merge into existing: crontab -e 4 # 5 # All workflows run daily between 2:00-8:00 UTC 6 # This window supports significant daily code generation. 7 # 8 # Authentication: 9 # Uses existing OAuth credentials from ~/.claude/.credentials.json 10 # (Created automatically when you run 'claude login' or use Claude Code) 11 # 12 # Requirements: 13 # - Claude Code CLI in PATH 14 # - Python 3.8+ with pyyaml 15 # - Run scripts/setup-workflow-hooks.sh for token optimization 16 # 17 # Logs: /var/log/claude-workflows/ 18 19 SHELL=/bin/bash 20 PATH=/usr/local/bin:/usr/bin:/bin:/home/devops/.local/bin:/home/devops/.cargo/bin 21 HOME=/home/devops 22 23 # === DAILY WORKFLOW PIPELINE (2:00-8:00 UTC) === 24 25 # 2:00 - Dead Code Cleanup (first - clears the way) 26 0 2 * * * /home/devops/working-repos/alpha-delta-context/scripts/claude-workflow-runner.py dead-code-cleanup >> /var/log/claude-workflows/deadcode.log 2>&1 27 28 # 3:00 - Dependency Updates (security fixes early) 29 0 3 * * * /home/devops/working-repos/alpha-delta-context/scripts/claude-workflow-runner.py dependency-update >> /var/log/claude-workflows/deps.log 2>&1 30 31 # 4:00 - Documentation Sync (sync cspec to markdown) 32 0 4 * * * /home/devops/working-repos/alpha-delta-context/scripts/claude-workflow-runner.py sync-docs >> /var/log/claude-workflows/docs.log 2>&1 33 34 # 5:00 - Mutation Survivors (strengthen weak tests) 35 0 5 * * * /home/devops/working-repos/alpha-delta-context/scripts/claude-workflow-runner.py mutation-survivors >> /var/log/claude-workflows/mutations.log 2>&1 36 37 # 6:00 - Coverage Improvement (add missing tests) 38 0 6 * * * /home/devops/working-repos/alpha-delta-context/scripts/claude-workflow-runner.py coverage-improve >> /var/log/claude-workflows/coverage.log 2>&1 39 40 # 7:00 - Dashboard Check (aggregate and report status) 41 0 7 * * * /home/devops/working-repos/alpha-delta-context/scripts/claude-workflow-runner.py dashboard-check >> /var/log/claude-workflows/dashboard.log 2>&1 42 43 # 8:00 - CI Repair (last - fixes any remaining issues) 44 0 8 * * * /home/devops/working-repos/alpha-delta-context/scripts/claude-workflow-runner.py ci-repair >> /var/log/claude-workflows/ci-repair.log 2>&1 45 46 # === LOG ROTATION === 47 # Rotate logs weekly, keep 4 weeks 48 # Add to /etc/logrotate.d/claude-workflows: 49 # 50 # /var/log/claude-workflows/*.log { 51 # weekly 52 # rotate 4 53 # compress 54 # delaycompress 55 # missingok 56 # notifempty 57 # create 644 devops devops 58 # }