ptask.save()

def start(self):
    """starts the task"""
ptask = self.periodic_task
ptask.enabled = True
ptask.save()

def terminate(self):
    self.stop()
ptask = self.periodic_task
self.delete()
ptask.delete()
How to dynamically add / remove periodic tasks to Celery (celerybeat)