Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
1 Responder
11102 Visualizações

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)

Avatar
Cancelar
Melhor resposta

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


Avatar
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
0
jun. 16
4439
4
jan. 20
10937
0
mar. 25
1595
0
jan. 25
3751
1
jan. 24
2999