'Activate the cron job depending on whether there exists action rules
based on time conditions.'

def _update_cron(self):

    cron = self.env.ref('base_action_rule.ir_cron_crm_action', raise_if_not_found=False)
    return (cron and cron.toggle(model=self._name, domain=[('kind', '=', 'on_time')]))
