Scheduler Default¶
SchedulerDefault is the default scheduler provider. It does nothing — schedule() returns immediately without running the workflow on any recurring schedule.
This is the provider used when no scheduler is explicitly configured in Config. It ensures that calling workflow.schedule() is always safe, even when scheduling is not needed.
Example¶
from dotflow import Config, DotFlow, action
from dotflow.providers import SchedulerDefault
@action
def task():
return {"scheduled": True}
def main():
workflow = DotFlow(config=Config(scheduler=SchedulerDefault()))
workflow.task.add(step=task)
return workflow
if __name__ == "__main__":
main()