跳至內容
選單
此問題已被標幟
1 回覆
11000 瀏覽次數

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']))


頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
0
6月 16
4320
4
1月 20
10784
0
3月 25
1466
0
1月 25
3612
1
1月 24
2695