def cron_lazy(func=None, minute=-1, hour=-1, day=-1, month=-1, dayweek=-1,
              executor=TaskExecutor.AUTO, run=False, **setup):

    def inner(function):
        cron_task = CronTask(
            function=function,
            executor=executor,
            minute=minute,
            hour=hour,
            day=day,
            month=month,
            dayweek=dayweek,
            **setup
        )

        if run:
            return cron_task()
        else:
            return cron_task

    if func is None:
        return inner

    return inner(func)
Creates cron-like task on execution
dataset/ETHPy150Open Bahus/uwsgi_tasks/uwsgi_tasks/decorators.py/cron_lazy