Hello,
I am facing the following issue:
I have a cron job that runs perfectly on our development instance. On dev, it takes around 20 minutes to complete. However, when I start it manually on our production instance, it completes instantly without actually performing any work.
Here are the logs from the production instance when I trigger the job manually:
2025-09-12 15:06:37,827 1044751 INFO webx odoo.addons.base.models.ir_cron: Manually starting job `OrgaMax Sync`. 2025-09-12 15:06:37,829 1044751 INFO webx odoo.addons.base.models.ir_cron: Job `OrgaMax Sync` done.
Notice that there are no errors in the logs or in the UI.
Cron job XML definition:
<odoo> <record id="orgamax_sync" model="ir.cron"> <field name="name">OrgaMax Sync</field> <field name="active" eval="True"/> <field name="state">code</field> <field name="model_id" ref="model_orgamax_sync"/> <field name="code">model.sync_customers()</field> <field name="interval_number">1</field> <field name="interval_type">days</field> <field name="user_id" ref="base.user_root"/> <field name="priority">1</field> </record> </odoo>
Model snippet:
import fdb import logging import time from odoo import models, api _logger = logging.getLogger(__name__) class OrgaMaxSync(models.Model): _name = "orgamax_sync" _description = "Sync customers from OrgaMax to Odoo" @api.model def sync_customers(self): _logger.info("STARTING JOB") start = time.time() ...
The rest of the sync_customers code is not very relevant since, as you can see, the log message "STARTING JOB" is never printed on production.
But there is error handling in the form of Try Except blocks which also log any erros using _logger.error
Module structure:
__manifest__.py { "name": "OrgaMaxSync", "data": [ "data/ir_cron_data.xml" ] } __init__.py from . import models models/__init__.py from . import OrgaMaxSync
The even stranger part is that this cron used to run on production but would eventually timeout. To fix that, I increased the CPU time in odoo.conf to 30 minutes. After that, the cron started behaving this way. I reverted the odoo.conf settings back to the previous state, but the cron job still finishes instantly.
I also tried setting the next execution time in the UI to 5 minutes in the future, but it still does not execute automatically. The cron is enabled (active=True).
I am on Odoo 17.
Has anyone experienced this before or have any idea why the cron would immediately finish without logging anything?