| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
Discuss (mail)
|
| Lines of code | 1246 |
| Technical Name |
cron_queue |
| License | LGPL-3 |
| Website | https://www.solvve.com |
| Versions | 17.0 18.0 19.0 |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
Discuss (mail)
|
| Lines of code | 1246 |
| Technical Name |
cron_queue |
| License | LGPL-3 |
| Website | https://www.solvve.com |
| Versions | 17.0 18.0 19.0 |
Sequential function execution using ir.cron workers
Community
Enterprise
odoo.sh
Overview
The Cron Queue module provides a robust queue system for sequential execution of tasks using Odoo's scheduled actions (ir.cron). It enables asynchronous processing of methods with priority management, retry mechanisms, and full UI monitoring capabilities.
Key Features
Sequential Execution
Tasks in a queue are executed one at a time in order, ensuring proper sequential processing.
Priority Support
Control execution order with customizable priority levels (0-15), from critical to low priority.
Retry Mechanism
Automatic retry of failed tasks with configurable retry limits to handle transient failures.
Multiple Queues
Support for unlimited independent queues with isolated processing for different task types.
User Context
Execute tasks with specific user permissions and context for security and compliance.
Full UI
Complete interface for monitoring queues, items, and execution statistics in real-time.
Usage
With retry mechanism
orders = self.env['sale.order'].search([('state', '=', 'draft')])
orders.with_cron_queue( 'order_processing', priority=1, max_retries=3 ).action_confirm()
Process empty recordset
partner = self.env['res.partner']
partner.with_cron_queue('maintenance').cleanup_old_data()
With custom description for better tracking
self.with_cron_queue( 'reports', description='Monthly sales report generation' ).generate_monthly_report()
Without immediate execution
self.with_cron_queue( 'batch_jobs', auto_trigger=False).process_batch()
Please log in to comment on this module