Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
4458 มุมมอง

Hi All,

I'm trying to put a simple scheduled task to work on .sh and SaaS.

Name: Test
Model : Contact
User : Myself
Execute every 1 minutes
Active : yes
Number of Calls -1
priority 1

Code =  log("test")

It seems it only runs when I click Run manually.

Why don't I get a log message every 1 minute ? 
Is there something I need to activate or any other setting I have to do to make it work ? 


Sincerly
Kristof


อวตาร
ละทิ้ง
ผู้เขียน

Thank you for the information.




Although I have one with a 15 min Delay too, which doesnt run either. I testers this on 2 SaaS and 1 .sh so I think i'm missing something . Are there any settings I could look out for which can cause this ?

คำตอบที่ดีที่สุด


From https://www.odoo.com/documentation/14.0/administration/odoo_sh/advanced/frequent_technical_questions.html

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi,

To create a scheduled action that runs every 1 minutes and is always active, you can modify the code as follows

<?xmlversion="1.0" encoding="UTF-8" ?>

<odoo>

    <data>

        <recordid="ir_cron_time_token" model="ir.cron">

            <fieldname="name">Test : </field>

            <fieldname="model_id" ref="model_res_partner"/>

            <fieldname="state">code</field>

            <fieldname="code">model.function_test()</field>

            <fieldname="interval_number">1</field>

            <fieldname="interval_type">minutes</field>

            <fieldname="numbercall">-1</field>

            <fieldname="active">True</field>

        </record>

    </data>

</odoo>




And write your function in python file of corresponding model

def function_test():

      #your code

Refer below blog to know more on scheduled action:

Scheduled Actions in Odoo 14


Hope it helps

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ส.ค. 23
1853
3
ต.ค. 22
10265
2
ก.ค. 22
11305
0
พ.ย. 21
1526
1
ก.ย. 21
4078