Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
3 Ответы
9094 Представления

Is possible has a cron task every 30 seconds?

Аватар
Отменить
Автор

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 .

Автор Лучший ответ

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


Аватар
Отменить
Лучший ответ

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

Аватар
Отменить
Лучший ответ

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

Аватар
Отменить
Автор

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

Related Posts Ответы Просмотры Активность
3
сент. 23
11768
1
авг. 22
4792
0
июн. 16
3534
0
окт. 24
2262
1
авг. 24
5162