<?xml version='1.0' encoding='utf-8'?>
<odoo noupdate="1">

    <record id="ir_cron_campaign_sync_participants" model="ir.cron">
        <field name="name">Marketing Automation: sync participants</field>
        <field name="model_id" ref="model_marketing_campaign"/>
        <field name="state">code</field>
        <field name="code">model.search([('state', '=', 'running')]).sync_participants()</field>
        <field name="interval_number">12</field>
        <field name="interval_type">hours</field>
        <field name="numbercall">-1</field>
    </record>

    <record id="ir_cron_campaign_execute_activities" model="ir.cron">
        <field name="name">Marketing Automation: execute activities</field>
        <field name="model_id" ref="model_marketing_campaign"/>
        <field name="state">code</field>
        <field name="code">model.search([('state', '=', 'running')]).execute_activities()</field>
        <field name="interval_number">1</field>
        <field name="interval_type">hours</field>
        <field name="numbercall">-1</field>
    </record>

</odoo>
