@@ -254,6 +254,7 @@ def schedule(
254254 calendarinterval_params : str | None = None ,
255255 date_params : str | None = None ,
256256 storage_options : str | None = None ,
257+ overwrite : bool = False ,
257258):
258259 """
259260 Schedule a pipeline with various configuration options.
@@ -280,6 +281,7 @@ def schedule(
280281 calendarinterval_params: Calendar interval parameters as JSON or key=value pairs
281282 date_params: Date parameters as JSON or key=value pairs
282283 storage_options: Storage options as JSON, dict string, or key=value pairs
284+ overwrite: Overwrite existing schedule
283285
284286 Examples:
285287 # JSON inputs
@@ -364,12 +366,98 @@ def schedule(
364366 max_jitter = max_jitter ,
365367 max_running_jobs = max_running_jobs ,
366368 conflict_policy = conflict_policy ,
369+ overwrite = overwrite ,
367370 ** kwargs ,
368371 )
369372
370373 logger .info (f"Job { id_ } scheduled." )
371374
372375
376+ @app .command ()
377+ def schedule_all (
378+ executor : str = "local" ,
379+ base_dir : str | None = None ,
380+ type : str = "cron" ,
381+ inputs : str | None = None ,
382+ final_vars : str | None = None ,
383+ config : str | None = None ,
384+ with_tracker : bool = False ,
385+ with_opentelemetry : bool = False ,
386+ paused : bool = False ,
387+ coalesce : str = "latest" ,
388+ misfire_grace_time : float | None = None ,
389+ max_jitter : float | None = None ,
390+ max_running_jobs : int | None = None ,
391+ conflict_policy : str = "do_nothing" ,
392+ crontab : str | None = None ,
393+ cron_params : str | None = None ,
394+ interval_params : str | None = None ,
395+ calendarinterval_params : str | None = None ,
396+ date_params : str | None = None ,
397+ storage_options : str | None = None ,
398+ overwrite : bool = False ,
399+ ):
400+ """
401+ Schedule all pipelines using the pipeline specific configurations (`conf/pipelines/<name>.yml`).
402+
403+ Args:
404+ executor: Executor to use
405+ base_dir: Base directory for the pipeline
406+ type: Type of schedule
407+ inputs: Input parameters as JSON, dict string, or key=value pairs
408+ final_vars: Final variables as JSON or list
409+ config: Config for the hamilton pipeline executor
410+ with_tracker: Enable tracking with hamilton ui
411+ with_opentelemetry: Enable OpenTelemetry tracing
412+ paused: Start the job in paused state
413+ coalesce: Coalesce policy
414+ misfire_grace_time: Misfire grace time
415+ max_jitter: Maximum jitter
416+ max_running_jobs: Maximum running jobs
417+ conflict_policy: Conflict policy
418+ crontab: Crontab expression
419+ cron_params: Cron parameters as JSON or key=value pairs
420+ interval_params: Interval parameters as JSON or key=value pairs
421+ calendarinterval_params: Calendar interval parameters as JSON or key=value pairs
422+ date_params: Date parameters as JSON or key=value pairs
423+ storage_options: Storage options as JSON, dict string, or key=value pairs
424+ overwrite: Overwrite existing schedule
425+
426+ Examples:
427+ pipeline schedule-all
428+ """
429+ if get_schedule_manager is None :
430+ raise ValueError ("APScheduler not installed. Please install it first." )
431+
432+ parsed_storage_options = parse_dict_or_list_param (storage_options , "dict" )
433+
434+ with PipelineManager (
435+ base_dir = base_dir ,
436+ storage_options = parsed_storage_options or {},
437+ ) as manager :
438+ manager .schedule_all (
439+ executor = executor ,
440+ type = type ,
441+ inputs = inputs ,
442+ final_vars = final_vars ,
443+ config = config ,
444+ with_tracker = with_tracker ,
445+ with_opentelemetry = with_opentelemetry ,
446+ paused = paused ,
447+ coalesce = coalesce ,
448+ misfire_grace_time = misfire_grace_time ,
449+ max_jitter = max_jitter ,
450+ max_running_jobs = max_running_jobs ,
451+ conflict_policy = conflict_policy ,
452+ overwrite = overwrite ,
453+ crontab = crontab ,
454+ cron_params = cron_params ,
455+ interval_params = interval_params ,
456+ calendarinterval_params = calendarinterval_params ,
457+ date_params = date_params ,
458+ )
459+
460+
373461@app .command ()
374462def new (
375463 name : str ,
0 commit comments