
Magento Cronjob Developer
- 119 installs
- 26 repo stars
- Updated January 24, 2026
- maxnorm/magento2-agent-skills
magento-cronjob-developer is a Cursor agent skill that implements Magento 2 cron jobs and scheduled background tasks for developers who need reliable crontab.xml configuration, job classes, and cron monitoring patterns.
About
magento-cronjob-developer is one of 30 specialized agent skills in maxnorm/magento2-agent-skills for Magento 2 and Adobe Commerce development. The skill covers crontab.xml job scheduling, PHP job class implementation with dependency injection and PSR logging, batch processing, error handling, retry logic, and monitoring via bin/magento cron:status, cron:run, and cron:schedule commands. It documents specialized cron types including inventory sync, price updates, order processing, data import/export, index management, and third-party API synchronization. The skill follows Magento enterprise patterns for group organization, schedule intervals, resource limits, and environment-specific configuration. Developers reach for magento-cronjob-developer when creating etc/crontab.xml entries, Vendor\Module\Cron\Job execute methods, or debugging failed scheduled tasks. It references official Adobe Commerce cron documentation and includes XML and PHP examples for job configuration and logging. The parent repository has 22 GitHub stars and adapts rubenzantingh/claude-code-magento-agents for the Agent Skills format.
- Documents crontab.xml job scheduling with group, instance, method, schedule cron syntax
- PHP job class template with LoggerInterface, try/catch, and execute() pattern
- Covers inventory sync, price updates, order processing, and index reindex cron types
- Monitoring via bin/magento cron:status, cron:run, cron:schedule CLI commands
- Part of 30-skill Magento 2 agent skills collection for Cursor
Magento Cronjob Developer by the numbers
- 119 all-time installs (skills.sh)
- +6 installs in the week ending Aug 4, 2026 (Skillselion tracking)
- Ranked #2,843 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
- Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/maxnorm/magento2-agent-skills --skill magento-cronjob-developerAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 119 |
|---|---|
| repo stars | ★ 26 |
| Last updated | January 24, 2026 |
| Repository | maxnorm/magento2-agent-skills ↗ |
How do you implement Magento 2 cron jobs correctly?
Configure etc/crontab.xml schedules and PHP Cron\Job execute classes with logging, batch processing, and bin/magento cron:run testing for Magento 2 modules.
Who is it for?
Magento 2 and Adobe Commerce developers implementing scheduled inventory sync, order processing, or maintenance cron jobs with proper crontab.xml and logging.
Skip if: Non-Magento PHP projects or teams using only external schedulers without Magento's native cron subsystem and bin/magento cron commands.
When should I use this skill?
User asks to create Magento cron jobs, configure crontab.xml, implement background scheduled tasks, or debug bin/magento cron failures.
What you get
crontab.xml job definitions, PHP Cron job classes with error handling, cron schedule configuration, and bin/magento cron monitoring commands.
- crontab.xml configuration
- PHP Cron job classes
- cron monitoring runbook
By the numbers
- One of 30 specialized Magento 2 agent skills in the parent repository
- Parent repository maxnorm/magento2-agent-skills has 22 GitHub stars
- Documents 3 bin/magento cron CLI commands: status, run, schedule
Files
Magento 2 Cron Job Developer
Expert specialist in creating reliable, efficient scheduled tasks and background processes that automate critical business operations while maintaining system performance and reliability.
When to Use
- Creating scheduled tasks
- Implementing background processing
- Automating system operations
- Building data synchronization jobs
- Implementing maintenance tasks
- Creating notification systems
Cron Job Architecture
- Cron Configuration: Master crontab.xml configuration and job scheduling
- Job Classes: Implement robust job execution classes and error handling
- Schedule Management: Design flexible scheduling patterns and intervals
- Resource Management: Optimize memory and processing resource usage
- Dependency Management: Handle job dependencies and execution order
Cron Development Process
1. Job Planning & Design
- Requirements Analysis: Understand business requirements and execution patterns
- Performance Planning: Plan for expected load and resource requirements
- Error Scenarios: Identify potential failure points and recovery strategies
- Monitoring Strategy: Plan logging, alerts, and performance tracking
- Integration Points: Design integration with existing systems and processes
2. Configuration Setup
- Crontab Configuration: Configure job scheduling in
etc/crontab.xml - Group Organization: Organize jobs into logical groups and categories
- Schedule Definition: Define appropriate execution intervals and timing
- Resource Allocation: Plan memory limits and execution timeouts
- Environment Configuration: Configure for different environments
3. Job Implementation
- Job Class Development: Create robust job execution classes
- Business Logic: Implement core job functionality and operations
- Data Processing: Handle data validation, transformation, and storage
- Error Handling: Implement comprehensive error handling and logging
- Progress Tracking: Create progress monitoring and status reporting
4. Testing & Deployment
- Unit Testing: Test individual job components and logic
- Integration Testing: Test job integration with system components
- Performance Testing: Validate job performance under expected load
- Error Testing: Test error scenarios and recovery mechanisms
- Deployment Strategy: Plan safe deployment and rollback procedures
Cron Configuration
crontab.xml Structure
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/crontab.xsd">
<group id="default">
<job name="vendor_module_job" instance="Vendor\Module\Cron\Job" method="execute">
<schedule>*/5 * * * *</schedule>
</job>
</group>
</config>Job Class Implementation
<?php
declare(strict_types=1);
namespace Vendor\Module\Cron;
use Psr\Log\LoggerInterface;
class Job
{
/**
* @param LoggerInterface $logger
*/
public function __construct(
private readonly LoggerInterface $logger
) {
}
/**
* Execute cron job
*/
public function execute(): void
{
try {
// Job logic here
$this->logger->info('Cron job executed successfully');
} catch (\Exception $e) {
$this->logger->error('Cron job failed: ' . $e->getMessage());
throw $e;
}
}
}Specialized Cron Job Types
E-commerce Automation
- Inventory Updates: Automated stock level synchronization and alerts
- Price Updates: Scheduled pricing changes and promotional activations
- Order Processing: Automated order status updates and fulfillment
- Customer Communications: Automated email campaigns and notifications
- Report Generation: Scheduled business reports and analytics
Data Management Jobs
- Data Import/Export: Automated data synchronization with external systems
- Database Maintenance: Scheduled cleanup, optimization, and archiving
- Log Management: Automated log rotation, cleanup, and archiving
- Backup Operations: Scheduled backup creation and validation
- Cache Management: Automated cache warming and invalidation
System Maintenance
- Performance Monitoring: Automated system health checks and alerts
- Security Scans: Scheduled security audits and vulnerability checks
- Update Processes: Automated system and extension updates
- Cleanup Operations: Temporary file cleanup and resource optimization
- Index Management: Automated reindexing and search optimization
Integration Jobs
- API Synchronization: Scheduled data sync with external APIs
- Third-party Updates: Automated integration with external services
- Webhook Processing: Background processing of webhook notifications
- Data Transformation: Automated data transformation and migration
- Notification Delivery: Scheduled notification and alert delivery
Best Practices
Performance
- Batch Processing: Process data in batches to avoid memory issues
- Resource Management: Monitor and limit memory usage
- Execution Time: Set appropriate execution timeouts
- Lock Management: Prevent job overlap and resource conflicts
- Optimization: Optimize queries and data processing
Reliability
- Error Handling: Comprehensive error handling and logging
- Retry Mechanisms: Implement retry logic for transient failures
- Monitoring: Log job execution and errors
- Alerting: Set up alerts for job failures
- Recovery: Implement recovery mechanisms for failed jobs
Security
- Access Control: Ensure proper permissions for job execution
- Data Validation: Validate all input data
- Error Messages: Don't expose sensitive information in error messages
- Logging: Log security-relevant events
- Audit Trail: Maintain audit trails for critical operations
Testing
- Unit Tests: Test job logic in isolation
- Integration Tests: Test job integration with system components
- Performance Tests: Validate job performance under load
- Error Tests: Test error scenarios and recovery
- Schedule Tests: Verify cron schedule configuration
Monitoring & Debugging
Logging
$this->logger->info('Job started');
$this->logger->debug('Processing item: ' . $itemId);
$this->logger->error('Job failed: ' . $exception->getMessage());Cron Status
# Check cron status
bin/magento cron:status
# Run cron manually
bin/magento cron:run
# Check cron schedule
bin/magento cron:scheduleReferences
Focus on creating reliable, efficient cron jobs that automate business operations while maintaining system performance and reliability.
Related skills
How it compares
Pick magento-cronjob-developer over generic PHP scheduling skills when crontab.xml, Magento groups, and bin/magento cron integration are required.
FAQ
What files does a Magento 2 cron job need?
magento-cronjob-developer specifies etc/crontab.xml for schedule and job instance mapping plus a PHP class under Cron/ with an execute() method wired through dependency injection. Jobs are grouped and scheduled with standard cron expressions.
How do you test Magento cron jobs?
magento-cronjob-developer references bin/magento cron:run to execute pending jobs, cron:status for health, and cron:schedule to inspect the schedule table. Unit and integration tests should cover job logic and error recovery paths.