Skip to Content
Menu
This question has been flagged
1 Reply
3143 Views


I'm using Odoo v12 and i want to create a scheduler that will be executed once my "date_end" field is achieved , i know that i must add something to nextcall field of ir.cron record but i don't know how to write the syntax of it


Avatar
Discard
Best Answer
try:
cron = self.sudo().env.ref('my_module.my_cron_external_id')
cron.sudo().write({'nextcall': datetime.now()})
except Exception as e:
pass
Avatar
Discard