You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
571 B

  1. You can create crons as usual via the admin interface or via code.
  2. The important thing, in both case, is to set `oneshot` flag as true.
  3. Developer shortcut
  4. ------------------
  5. You can easily create a oneshot cron like this:
  6. .. code-block:: python
  7. cron = self.env['ir.cron'].schedule_oneshot(
  8. 'res.partner', method='my_cron_method')
  9. If you need to customize other parameters you can pass them as keyword args:
  10. .. code-block:: python
  11. my_values = {...}
  12. cron = self.env['ir.cron'].schedule_oneshot(
  13. 'res.partner', method='my_cron_method', **my_values)