class MyTask(PeriodicTask):

    def run(self, **kwargs):
        logger = self.get_logger(**kwargs)
logger.info('Running my task')
django celery: how to set task to run at specific interval programmatically