Manual operations create technical debt and human error risks. This article explores a pragmatic approach to backend automation using cron for system tasks and Bitrix agents for business logic, emphasizing simplicity, logging, and predictable behavior over complex infrastructure.
Manual Operations Are Technical Debt
Most backend project problems don't start with bugs—they start with actions that "can be done manually for now." Manual operations:
- Are performed differently each time
- Depend on specific people
- Get forgotten
- Break at the worst possible moment
If an action repeats, it should be automated. This isn't DevOps fetishism; it's basic engineering hygiene.
When Automation Actually Makes Sense
I don't automate everything—only what:
- Runs regularly
- Affects data or business logic
- Requires reproducible results
- Is difficult or dangerous to do manually
Typical cases from real projects:
- Exchanges and synchronizations (CRM ↔ CMS, catalogs, statuses)
- Background processing and queues
- Data cleanup and validation
- Diagnostics, reports, alerts
- Regulatory checks
If automation doesn't reduce risks, it's not needed.
Cron and Bitrix Agents—No Magic Required
In production, I use a simple, reliable tandem:
- Cron for system and regulatory tasks
- Bitrix agents for business logic within the project
Why this works:
- Minimum dependencies
- Easy to debug
- Transparent for support
- Doesn't require separate infrastructure
- Survives team changes
Cron does its job on schedule. Agents know the project context and data. Each tool works strictly in its area of responsibility.
Control and Logging—Not Optional
Automation without logs is an illusion of control. Any background process must:
- Log start and result
- Validate input data
- Handle errors correctly
- Be able to finish safely
If a process cannot be:
- Tracked
- Reproduced
- Explained by logs
—it shouldn't run automatically.
Why I Avoid Over-Engineering
The more complex the automation system, the:
- More expensive support becomes
- Higher the failure probability
- More difficult project handover gets
- More "magic" and less control exists
I consciously avoid:
- Unnecessary queues
- Custom frameworks
- Heavy workers where cron suffices
- "For growth" infrastructure that's not needed now
My approach: minimal toolset, clear architecture, predictable behavior, automation that's not scary to touch.
The Result
Good backend automation:
- Doesn't attract attention
- Doesn't require constant monitoring
- Doesn't break from minor issues
- Reduces human errors
It just does its job. And that's exactly how it should be.

Read more on viku-lov.ru

Comments
Please log in or register to join the discussion