From magento2-commerce
Implement Magento 2 events, observers, cron jobs, and message queues for event-driven logic, scheduled tasks, and asynchronous processing.
How this skill is triggered — by the user, by Claude, or both
Slash command
/magento2-commerce:magento-events-cronThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
**Fetch live docs**:
Fetch live docs:
https://developer.adobe.com/commerce/php/development/components/events-and-observers/ for events/observers guidesite:developer.adobe.com commerce php development components message-queues for message queue guidesite:developer.adobe.com commerce php development components cron for cron developmentPublish-subscribe pattern: code dispatches named events, and observers respond.
$this->eventManager->dispatch('event_name', ['key' => $value]);
EventManagerInterface is injected via constructor.
Observers are bound to events in etc/events.xml (global), etc/frontend/events.xml, or etc/adminhtml/events.xml:
event name — event to observeobserver name — unique identifierinstance — observer class (fully qualified)Observer/ directoryMagento\Framework\Event\ObserverInterfaceexecute(Observer $observer) — access event data via $observer->getEvent()etc/events.xml — runs in ALL areasetc/frontend/events.xml — storefront onlyetc/adminhtml/events.xml — admin onlyMagento dispatches hundreds of events. Common categories:
catalog_product_save_before/after — product save lifecyclecheckout_submit_all_after — order placementcustomer_register_success — customer registrationsales_order_place_after — order placedcontroller_action_predispatch/postdispatch — request lifecycleCron jobs are declared in etc/crontab.xml:
job name — unique identifierinstance — class namemethod — method to call (usually execute)schedule — cron expression (minute hour day month weekday)group — cron group (default, index; Adobe Commerce also has staging, catalog_event)Any class with an execute() method. No interface required. Constructor injection for dependencies.
etc/cron_groups.xmlbin/magento cron:run # Run all due cron jobs
bin/magento cron:install # Install system crontab entry
For asynchronous, resource-intensive, or decoupled operations. Supports AMQP (RabbitMQ) and MySQL-based queues.
communication.xml — defines topics and request/response typesqueue_consumer.xml — maps queues to consumer handler classesqueue_topology.xml — exchanges, queues, routingqueue_publisher.xml — defines where topics publish toConsumer class with a process($message) method. Started via:
bin/magento queue:consumers:start <consumer_name>
index cron group for indexer-related jobsFetch the events/observers and cron documentation for exact XML schemas, event names, and cron expression syntax before implementing.
npx claudepluginhub orcaqubits/agentic-commerce-skills-plugins --plugin magento2-commerceImplements Medusa v2 event subscribers for pub/sub handling, handler functions, cron scheduled jobs, and Redis/in-memory event bus. Use when reacting to commerce events like product.created or order.placed.
Deploys Magento 2 to production: modes, static content, DI compilation, CLI commands, zero-downtime strategies (blue-green, symlinks), CI/CD pipelines.
Schedule recurring tasks with the Symfony Scheduler component (7.x+); define schedules, triggers, and integrate with Messenger for async workflows and retry handling.