Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
10353 Widoki

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)

Awatar
Odrzuć
Najlepsza odpowiedź

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


Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
0
cze 16
3827
4
sty 20
10182
0
mar 25
423
0
sty 25
2635
1
sty 24
1334