Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
3 Odpovědi
9101 Zobrazení

Is possible has a cron task every 30 seconds?

Avatar
Zrušit
Autor

Niyas, thanks for answer, the problem it's that I need to request an Api every 30 seconds. And the Odoo thread has a 60 seconds hardcoded limited .

Autor Nejlepší odpověď

Thanks Federico, what I did was to have a dynamic next_execution_time. This way I set Next execution 30 seconds later.


Avatar
Zrušit
Nejlepší odpověď

Old question, and I didn't try it if is possible to hack the time limit. One solution may be to make 2 cron of 60 seconds one 30 second apart. Each of them will then call the same Api function

Avatar
Zrušit
Nejlepší odpověď

@vladimir881002 can you share your code, how you have done dynamic next_execution_time.

Avatar
Zrušit
Autor

<field name="nextcall" eval="(DateTime.now() + timedelta(seconds=30)).strftime('%Y-%m-%d %H:%M:%S')" />

Related Posts Odpovědi Zobrazení Aktivita
3
zář 23
11771
1
srp 22
4798
0
čvn 16
3539
0
říj 24
2267
1
srp 24
5166