تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
4 الردود
16251 أدوات العرض

I have the impression that users need to log-in first to init the database in the server process. Only after the login, the cron will start to execute jobs.

We run 10+ databases on 1 OpenERP server process. After one simple restart it seems we have to log-in into every database before cronjobs start running.

Why is that? And how to overcome this?

الصورة الرمزية
إهمال

I think, cron jobs starts runing after the server receives it's first request for page. Not after login. Please check it with a simple print button on the cron function ( in python file). Cheers!!

@HanesSmit any updates in this?

أفضل إجابة

This is a very old question but the problem is still present in 12.0 so, here's a workaround. You just have to hit Odoo with a scheduled task in the background. If you're using Linux, you're in luck as this is fairly easy with crontab. Here's a rule:

* * * * * wget -O - http://addresss:port/web?db=database_name_here >/dev/null 2>&1

This will access the login screen for the given database every one minute, so this should wake Odoo up. Also, no error or message will be returned so it's safe. I'm not sure if this has to be done for each database or just one per server though.

Taken from: https://stackoverflow.com/questions/13259530/using-cron-jobs-to-visit-url

الصورة الرمزية
إهمال
أفضل إجابة

Hello, I found the solution for this, you need to set the db_name conf in your configuration file.

db_name = 'your_database'

After doing this the database init when you run the server process.

Hope this help!

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
2
أبريل 23
2842
0
مارس 15
5534
1
مارس 15
5846
0
مايو 21
3566
2
أبريل 20
15693