Ali Cigari
08/17/2023, 11:25 AMAli Cigari
08/17/2023, 11:29 AMshould_execute
will do the trick
def should_execute(context: ScheduleEvaluationContext) -> bool:
return (context.scheduled_execution_time - datetime.datetime.now(tz=datetime.timezone.utc)).total_seconds() < 120
so e.g. above will make my schedule get created 120s before my job runs....sean
08/18/2023, 3:31 PMshould_execute
should work for you here.Ali Cigari
08/18/2023, 3:32 PM