Created
October 8, 2022 16:37
-
-
Save 3mrdev/4f295ae83c0788b9a690358190e07d8a to your computer and use it in GitHub Desktop.
How to make a cron job in Odoo? (Recurrent Background Service)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<odoo> | |
<data noupdate="0"> | |
<record id="cron_id" forcecreate='True' model="ir.cron"> | |
<field name="name">Cron Name</field> | |
<field eval="True" name="active"/> | |
<field name="user_id" ref="base.user_root"/> | |
<field name="interval_number">5</field> | |
<field name="interval_type">minutes</field> | |
<field name="numbercall">-1</field> | |
<field name="model_id" ref="model_your_model_name"/> | |
<field name="state">code</field> | |
<field name="code">model.your_method()</field> | |
</record> | |
</data> | |
</odoo> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment