INNER CODE UNIT · Python
frequent_task
MichielMe/fastscheduler · src/fastscheduler/main.py:196
def frequent_task():
...
"""
if not CRONITER_AVAILABLE:
raise ImportError(
"Cron scheduling requires croniter. "
"Install with: pip install fastscheduler[cron]"
)
return CronScheduler(self, expression)
def once(self, delay: Union[int, float]) -> OnceScheduler:
"""Schedule a one-time task."""
scheduler = OnceScheduler(self, delay)
scheduler._decorator_mode = True
return scheduler
def at(self, target_time: Union[datetime, str]) -> OnceScheduler:
"""Schedule a task at a specific datetime."""