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

I need run some task in odoo every few seconds, I know how to create a cron but I can not see anything about executing in less than a minute.

Odoo 8.

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

<field name="interval_type">minutes</field>(seconds)

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

interval type is upto minutes. But you can override the _process_job and make the next call as per your need. Here you can a quesry is executing to set the next call and other related params.

cron_cr.execute("UPDATE ir_cron SET nextcall=%s, numbercall=%s"+addsql+" WHERE id=%s",(fields.Datetime.to_string(nextcall.astimezone(pytz.UTC)), numbercall, job['id']))


อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
มิ.ย. 16
3868
4
ม.ค. 20
10214
0
มี.ค. 25
461
0
ม.ค. 25
2673
1
ม.ค. 24
1393