Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
17581 Lượt xem

I'd like to check whether tha latest scheduled jobs were run succesfully or not, where can I see that?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

You can Run Manually the Scheduled Actions, and if no error pops up, it is successfully achieved!

And another more technical way is to write PYTHON CODE in Scheduled Actions :

> log("Sample Run - Odoo Forum By Darshan", level='info')

AND OUTPUT LOG MESSAGE APPEARS IN THE LOG MENU WHICH IS UNDER TECHNICAL MENU :

Log Messages will also help User to track the variable value and outputs

Logging variable output python code example :

> event_recs = env['calendar.event'].search([('name', '=', 'Requirements review')])

> log(event_recs.ids, level='info')

Again check the answer in the logging menu.

Thanks, Darshan!

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

I don't think it's default behaviour for odoo to log the events of the cron tasks.

To see if a cron has been called, you can check the db-table ir_cron and check for the write_date. This field contains the date when the record was last modified.

Another option would be to import logging in your python file where the cron's function is. then instantiate the logger: _logger = logging.getlogger(__name__). To use the logger _logger.debug('myDebugMSG'). When you use this method, you will be able to see if the cron has ran (successfully or not) in your odoo log

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 10 23
8309
1
thg 8 25
4994
0
thg 12 24
9998
3
thg 9 24
22348
5
thg 12 24
53988