Oneshot cron

base_cron_oneshot
REPOSITORY
REPOSITORYOCA/server-tools
GIT
GIThttps://github.com/OCA/server-tools.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/server-tools/tree/11.0/base_cron_oneshot
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYExtra Tools
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Camptocamp
COMMITTERS
COMMITTERSStéphane Bidoul (ACSONE), oca-travis, OCA-git-bot, Simone Orsi, oca-ci
WEBSITE
WEBSITEhttps://github.com/OCA/server-tools
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:24:00
ODOO DEPENDENCIES
ODOO DEPENDENCIES
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (1)
XML IDNameModelTypeStatus
ir_cron_view_form ir.cron.form ir.cron field Inherits base.ir_cron_view_form
Models touched (1)

New fields (1)
  • oneshot Boolean
    default=False help='Enable this to run the cron only once. The cron will be deleted right after execution.' string='Single use'
Public methods (3)
  • create(self, vals)
    @api.model
  • cron_oneshot_cleanup(self)
    @api.model
  • schedule_oneshot(self, model_name, method=None, code=None, delay=('minutes', 10), **kw)
    @api.model
    Create a one shot cron. :param model_name: a string matching an odoo model name :param method: an existing method to call on the model :param code: custom code to run on the model :param delay: timedelta compat values for delay as tuple :param kw: custom values for the cron