Cronjob Documentation System
This directory contains auto-generated documentation for all cronjobs defined in system-crontab.md.
Overviewβ
Cronjobs are production-critical workflows that run silently in the background. This documentation system ensures:
- π Visibility: Every cronjob has structured documentation
- π Traceability: Links from cron schedules to Symfony Command classes
- β οΈ Risk Assessment: Identification of critical workflows (sales, payments, stock)
- π Freshness: Automated checks for documentation completeness and staleness
- π¨ CI Enforcement: Automated validation that fails on missing or outdated docs
Statisticsβ
-
:material-file-document-multiple: Total Entries
164 active cron entries parsed from system crontab
-
:material-code-braces: Unique Commands
115 unique Symfony console commands identified
-
:material-link-variant: Code Linkage
95/115 (82%) commands linked to source files
-
:material-alert-circle: High Risk
46 critical + 40 high risk commands
Browse by Risk Levelβ
:material-alert-decagram: Critical Risk (46 commands)β
Commands involving sales, payments, refunds, or stock mutations:
- Sales Commands - Order processing, status updates
- Payment Commands - Payment verification, refunds
- Refund Commands - Refund processing and validation
- Stock Commands - Inventory updates, stock synchronization
:material-alert: High Risk (40 commands)β
Commands with significant business impact:
- Product Commands - Product sync, pricing, availability
- Sync Commands - Data synchronization with external systems
- Import/Export - Bulk data operations
:material-information: Medium Risk (8 commands)β
Supporting commands: logs, statistics, alerts, notifications
:material-help-circle: Unknown Risk (21 commands)β
Commands needing risk assessment through code inspection
Browse Alphabeticallyβ
- A-C - Commands starting with A through C
- D-M - Commands starting with D through M
- N-Z - Commands starting with N through Z
Documentation Formatβ
Each cronjob documentation file follows this structure:
---
title: "command:name"
type: cronjob
source: system-crontab
status: active | undocumented
last_verified: YYYY-MM-DD
schedule:
- "*/10 * * * *"
command:
- "full:command --with-options"
risk_level: critical | high | medium | unknown
command_class: "src/Path/To/CommandClass.php"
---
# Command Name
## Overview
...
Risk Level Definitionsβ
| Level | Description | Business Impact | Examples |
|---|---|---|---|
| π΄ Critical | Sales, payments, refunds, stock mutations | Immediate financial/inventory impact | menzzo:v2:sales:payment |
| π‘ High | Products, sync, orders, imports | Significant operational impact | menzzo:v2:products |
| π’ Medium | Logs, stats, alerts, notifications | Supporting functions | menzzo:statistic |
| βͺ Unknown | Needs assessment | Not yet determined | Various |
Usageβ
Regenerate Documentationβ
python3 tools/cronjob_doc_generator.py
This will:
- Parse
docs/system-crontab.mdfor all active cron entries - Extract unique Symfony console commands
- Generate documentation files in
docs/cronjobs/ - Attempt to locate corresponding Command class files
- Generate
docs/meta/documentation-progress.mdwith coverage statistics
When to Regenerateβ
Run the generator whenever:
- β
Cron entries are added, removed, or modified in
system-crontab.md - β Command schedules change
- β New Command classes are created
- β Command classes are moved or renamed
- β You want to refresh coverage statistics
Update System Crontabβ
# 1. Update crontab
crontab -e
# 2. Document changes
php bin/console logidav:cron:document
# 3. Regenerate docs
python3 tools/cronjob_doc_generator.py
# 4. Commit
git add docs/ && git commit -m "docs: update cronjobs"
CI Enforcementβ
Documentation validation should happen whenever cronjob docs are updated:
- β All cronjobs have corresponding documentation files
- β
docs/meta/documentation-progress.mdexists and is parseable - β οΈ Warns about commands without located class files
- β οΈ Warns about commands with unknown risk levels
- β οΈ Identifies potentially stale documentation (>90 days old)
- π Reports coverage statistics
Priority Tasksβ
Based on the progress report:
π΄ Critical Priorityβ
- 46 commands mutating sales, payments, refunds, or stock - REQUIRES IMMEDIATE DOCUMENTATION
- 20 commands with no matching Command class or unable to locate
π‘ High Priorityβ
- 40 high-risk commands with significant business impact
- Add @doc.* annotations to all 95 located Command classes
- Document business intent and side effects for all commands
βͺ Unknown Riskβ
- 21 commands need risk assessment through code inspection
Key Principlesβ
- Crontab is Source of Truth:
system-crontab.mdis the authoritative definition - Never Silent: Cronjobs run in background but must be documented
- Operational Debt: Undocumented cronjobs are technical debt
- Regenerate, Don't Edit: Always regenerate base docs from source
- Code Linkage: Documentation must trace to actual Command classes
- Risk First: Prioritize documenting critical workflows
Related Documentationβ
- System Overview - Complete documentation system guide
- Progress Report - Coverage tracking
- System Crontab - Source of truth
!!! info "Commands Not in This System" This system tracks cronjobs only. It does NOT document:
- API endpoints
- Web workflows
- Manual console commands
- Event listeners
- Message queue consumers
These will be addressed in separate documentation initiatives.