콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
4547 화면

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 ?

베스트 답변

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

아바타
취소
관련 게시물 답글 화면 활동
1
8월 23
1891
3
10월 22
10345
2
7월 22
11351
0
11월 21
1569
1
9월 21
4125