콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
3 답글
9298 화면

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')" />

관련 게시물 답글 화면 활동
3
9월 23
12059
1
8월 22
4898
0
6월 16
3651
0
10월 24
2469
1
8월 24
5409