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

I have created custom cron job and setup odoo server with nginx. After restarting the server it is working properly but after some time it is showing model has not attribute of that cron code. And it showing error in server action.

Can you help me for that? 

My odoo version: V16CE

Awatar
Odrzuć
Autor

I have check the logs.
If i run cron manually it is working properly even after restarting server upto some cyscle it is working properly.
But after sometime it is showing that model has no attribute and it is not executing code which i have defined in cron.

Najlepsza odpowiedź

Facing same issue when ever run cron job auto, but manually it works.

ERROR ? odoo.service.server: Worker WorkerCron (593084) Exception occurred, exiting... 

Traceback (most recent call last):

  File "/opt/odoo/odoo/service/server.py", line 1127, in _runloop

    self.process_work()

  File "/opt/odoo/odoo/service/server.py", line 1226, in process_work

    base.models.ir_cron.ir_cron._process_jobs(db_name)

AttributeError: module 'odoo.models' has no attribute 'ir_cron'


Awatar
Odrzuć
Najlepsza odpowiedź

Hi,

Suppose you're experiencing issues with your custom cron job in Odoo, intermittently failing with an attribute error, causing problems with server actions. In that case, you can follow these steps to troubleshoot and resolve the issue:

1. Check the implementation of the cron job.

2. Inspect server logs for error messages related to the cron job.

3. Review the server action configuration that triggers the cron job.

4. Check for database integrity issues.

5. Review server configuration.

6. Check for resource constraints.

7. Upgrade or patch Odoo to ensure you're using the latest version.

8. Test and debug your cron job in a development environment.

By following these steps, you should be able to diagnose and resolve the attribute error affecting your custom cron job.


Hope it helps

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
3
wrz 23
11950
0
paź 24
2372
1
sie 24
5297
0
maj 21
3751
1
maj 24
7578