@@ -275,6 +275,7 @@ async def start_workflow(
275
275
cron_schedule : str = "" ,
276
276
memo : Optional [Mapping [str , Any ]] = None ,
277
277
search_attributes : Optional [temporalio .common .SearchAttributes ] = None ,
278
+ start_delay : Optional [timedelta ] = None ,
278
279
start_signal : Optional [str ] = None ,
279
280
start_signal_args : Sequence [Any ] = [],
280
281
rpc_metadata : Mapping [str , str ] = {},
@@ -299,6 +300,7 @@ async def start_workflow(
299
300
cron_schedule : str = "" ,
300
301
memo : Optional [Mapping [str , Any ]] = None ,
301
302
search_attributes : Optional [temporalio .common .SearchAttributes ] = None ,
303
+ start_delay : Optional [timedelta ] = None ,
302
304
start_signal : Optional [str ] = None ,
303
305
start_signal_args : Sequence [Any ] = [],
304
306
rpc_metadata : Mapping [str , str ] = {},
@@ -325,6 +327,7 @@ async def start_workflow(
325
327
cron_schedule : str = "" ,
326
328
memo : Optional [Mapping [str , Any ]] = None ,
327
329
search_attributes : Optional [temporalio .common .SearchAttributes ] = None ,
330
+ start_delay : Optional [timedelta ] = None ,
328
331
start_signal : Optional [str ] = None ,
329
332
start_signal_args : Sequence [Any ] = [],
330
333
rpc_metadata : Mapping [str , str ] = {},
@@ -351,6 +354,7 @@ async def start_workflow(
351
354
cron_schedule : str = "" ,
352
355
memo : Optional [Mapping [str , Any ]] = None ,
353
356
search_attributes : Optional [temporalio .common .SearchAttributes ] = None ,
357
+ start_delay : Optional [timedelta ] = None ,
354
358
start_signal : Optional [str ] = None ,
355
359
start_signal_args : Sequence [Any ] = [],
356
360
rpc_metadata : Mapping [str , str ] = {},
@@ -375,6 +379,7 @@ async def start_workflow(
375
379
cron_schedule : str = "" ,
376
380
memo : Optional [Mapping [str , Any ]] = None ,
377
381
search_attributes : Optional [temporalio .common .SearchAttributes ] = None ,
382
+ start_delay : Optional [timedelta ] = None ,
378
383
start_signal : Optional [str ] = None ,
379
384
start_signal_args : Sequence [Any ] = [],
380
385
rpc_metadata : Mapping [str , str ] = {},
@@ -400,6 +405,9 @@ async def start_workflow(
400
405
cron_schedule: See https://docs.temporal.io/docs/content/what-is-a-temporal-cron-job/
401
406
memo: Memo for the workflow.
402
407
search_attributes: Search attributes for the workflow.
408
+ start_delay: Amount of time to wait before starting the workflow.
409
+ This does not work with ``cron_schedule``. This is currently
410
+ experimental.
403
411
start_signal: If present, this signal is sent as signal-with-start
404
412
instead of traditional workflow start.
405
413
start_signal_args: Arguments for start_signal if start_signal
@@ -444,6 +452,7 @@ async def start_workflow(
444
452
cron_schedule = cron_schedule ,
445
453
memo = memo ,
446
454
search_attributes = search_attributes ,
455
+ start_delay = start_delay ,
447
456
headers = {},
448
457
start_signal = start_signal ,
449
458
start_signal_args = start_signal_args ,
@@ -469,6 +478,7 @@ async def execute_workflow(
469
478
cron_schedule : str = "" ,
470
479
memo : Optional [Mapping [str , Any ]] = None ,
471
480
search_attributes : Optional [temporalio .common .SearchAttributes ] = None ,
481
+ start_delay : Optional [timedelta ] = None ,
472
482
start_signal : Optional [str ] = None ,
473
483
start_signal_args : Sequence [Any ] = [],
474
484
rpc_metadata : Mapping [str , str ] = {},
@@ -493,6 +503,7 @@ async def execute_workflow(
493
503
cron_schedule : str = "" ,
494
504
memo : Optional [Mapping [str , Any ]] = None ,
495
505
search_attributes : Optional [temporalio .common .SearchAttributes ] = None ,
506
+ start_delay : Optional [timedelta ] = None ,
496
507
start_signal : Optional [str ] = None ,
497
508
start_signal_args : Sequence [Any ] = [],
498
509
rpc_metadata : Mapping [str , str ] = {},
@@ -519,6 +530,7 @@ async def execute_workflow(
519
530
cron_schedule : str = "" ,
520
531
memo : Optional [Mapping [str , Any ]] = None ,
521
532
search_attributes : Optional [temporalio .common .SearchAttributes ] = None ,
533
+ start_delay : Optional [timedelta ] = None ,
522
534
start_signal : Optional [str ] = None ,
523
535
start_signal_args : Sequence [Any ] = [],
524
536
rpc_metadata : Mapping [str , str ] = {},
@@ -545,6 +557,7 @@ async def execute_workflow(
545
557
cron_schedule : str = "" ,
546
558
memo : Optional [Mapping [str , Any ]] = None ,
547
559
search_attributes : Optional [temporalio .common .SearchAttributes ] = None ,
560
+ start_delay : Optional [timedelta ] = None ,
548
561
start_signal : Optional [str ] = None ,
549
562
start_signal_args : Sequence [Any ] = [],
550
563
rpc_metadata : Mapping [str , str ] = {},
@@ -569,6 +582,7 @@ async def execute_workflow(
569
582
cron_schedule : str = "" ,
570
583
memo : Optional [Mapping [str , Any ]] = None ,
571
584
search_attributes : Optional [temporalio .common .SearchAttributes ] = None ,
585
+ start_delay : Optional [timedelta ] = None ,
572
586
start_signal : Optional [str ] = None ,
573
587
start_signal_args : Sequence [Any ] = [],
574
588
rpc_metadata : Mapping [str , str ] = {},
@@ -597,6 +611,7 @@ async def execute_workflow(
597
611
cron_schedule = cron_schedule ,
598
612
memo = memo ,
599
613
search_attributes = search_attributes ,
614
+ start_delay = start_delay ,
600
615
start_signal = start_signal ,
601
616
start_signal_args = start_signal_args ,
602
617
rpc_metadata = rpc_metadata ,
@@ -3753,6 +3768,7 @@ class StartWorkflowInput:
3753
3768
cron_schedule : str
3754
3769
memo : Optional [Mapping [str , Any ]]
3755
3770
search_attributes : Optional [temporalio .common .SearchAttributes ]
3771
+ start_delay : Optional [timedelta ]
3756
3772
headers : Mapping [str , temporalio .api .common .v1 .Payload ]
3757
3773
start_signal : Optional [str ]
3758
3774
start_signal_args : Sequence [Any ]
@@ -4233,6 +4249,8 @@ async def start_workflow(
4233
4249
temporalio .converter .encode_search_attributes (
4234
4250
input .search_attributes , req .search_attributes
4235
4251
)
4252
+ if input .start_delay is not None :
4253
+ req .workflow_start_delay .FromTimedelta (input .start_delay )
4236
4254
if input .headers is not None :
4237
4255
temporalio .common ._apply_headers (input .headers , req .header .fields )
4238
4256
0 commit comments