Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
11114 Переглядів

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
4446
4
січ. 20
10951
0
бер. 25
1598
0
січ. 25
3762
1
січ. 24
3021