aimeos/ai-controller-jobs
Laravel job controller package for Aimeos that runs scheduled e-commerce tasks like indexing, cache cleanup, order processing and notifications. Integrates with queues/cron to automate background jobs for Aimeos shops.
Install the package via Composer: composer require aimeos/ai-controller-jobs. No manual service provider registration—Laravel auto-discovers it. Your first step is configuring job settings in config/aimeos.php, especially the jobs section (e.g., queue connection, default timeout). Then, wire it into Laravel’s scheduler in app/Console/Kernel.php by adding a recurring task like $schedule->command('ai:job maintenance')->daily();. Run a manual test with php artisan ai:job maintenance to confirm job controllers execute without errors. Check logs immediately—many issues surface as silent CLI failures.
Aimeos\Jobs\Index\Rebuild, Aimeos\Jobs\Email\Send, or Aimeos\Jobs\Maintenance\Cleanup before building custom ones.\Aimeos\Base\Job\Standard, implement run(\Aimeos\MShop\Context\Item\Iface $context), and register your class in config/aimeos/jobs.php (e.g., 'product-sync' => \App\Jobs\ProductSync::class).$manager->search()->slice(0, 100))—job controllers handle one chunk per run() call.dispatch(new SyncExternalCatalog($context))) for heavy I/O or external API calls, but keep the core Aimeos job lightweight.$context->getLogger()->info('Started catalog rebuild') or Laravel’s \Log::channel('jobs')—context provides shared handles (DB, cache, config), avoiding hardcoded dependencies.$context for configuration, DB access, and logging.--verbose; wrap all logic in try/catch and log exceptions explicitly. Test with php artisan ai:job maintenance 2>&1 | tee output.log to catch stderr.maintenance). Always prefix your custom job keys (e.g., acme/maintenance) and register them fully-qualified to avoid collisions or override conflicts.config/aimeos/jobs.php replaces the default controller—ensure your custom class maintains the same interface (i.e., accepts $context and returns void).How can I help you explore Laravel packages today?