# Schedule a child workflow to be triggered at given time

**URL:** <https://community.temporal.io/t/schedule-a-child-workflow-to-be-triggered-at-given-time/13742>\
**Category:** Community Support\
**Tags:** child-workflow, cron, typescript-sdk\
**Created:** [October 2, 2024, 8:45am UTC](https://community.temporal.io/t/schedule-a-child-workflow-to-be-triggered-at-given-time/13742 "2024-10-02T08:45:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Oscar\_Lucena\_Papiol](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/oscar_lucena_papiol/32/5847_2.png) [@Oscar\_Lucena\_Papiol](https://community.temporal.io/u/Oscar_Lucena_Papiol)\
**Post date:** [October 2, 2024, 8:45am UTC](https://community.temporal.io/t/schedule-a-child-workflow-to-be-triggered-at-given-time/13742/1 "2024-10-02T08:45:35Z")

</div>

Hello!

I’m investigating the best way to make a **child** workflow to be triggered at certain time later on (let’s say at 12:00pm) and only one time.

Parent workflow should run and if all activities succeed a child workflow should be created with a schedule to be triggered at 12:00pm AND parent workflow should be updated to completed.

What would be the best approach to achieve that?  
I’ve spent some time reading and I’m not sure if that is possible or what is the best way.

Creating a Cron or a Schedule require to be using the `client` and `connection` which I’m not sure it would be a good practice to use that within a workflow (or even if its possible).  
Also can Schedules or Cron be triggered **only** one time, at given time?

I haven’t seen any example or mention showing that a `child` workflow can be configured and compatible with Schedule or Cron.

I’ve been reading about `startDelay`, but again, not sure if that can be used on a child workflow? It would require to update temporal version which can led to more work.  
This approach would also require to do some calculation to determine how much should it delay to be triggered at 12.

And lastly we have the `sleep` option, I can put the child workflow to sleep, again needing to do some calculations for it to be triggered at given time.

For the `startDelay` and `sleep` options, I also wonder if the parent workflow can go to complete status once the child workflow has spawned.

Any suggestions on which would be the best approach?

---

<div class="post-metadata">

**Author:** ![tihomir](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/tihomir/32/6580_2.png) [@tihomir](https://community.temporal.io/u/tihomir)\
**Post date:** [October 13, 2024, 9:56am UTC](https://community.temporal.io/t/schedule-a-child-workflow-to-be-triggered-at-given-time/13742/2 "2024-10-13T09:56:28Z")

</div>

Would go with starting child workflow async (via `startChild`) with `abandoned` parent close policy

`parentClosePolicy: ParentClosePolicy.PARENT_CLOSE_POLICY_ABANDON,`

and calculate the timer (sleep) time in child workflow.  
This way you reserve your child workflow id right away and would allow the parent execution to complete as you mentioned.

> I’ve been reading about `startDelay` , but again, not sure if that can be used on a child workflow?

not currently as it cannot be set in child workflow options

---

<div class="post-metadata">

**Author:** ![Oscar\_Lucena\_Papiol](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/oscar_lucena_papiol/32/5847_2.png) [@Oscar\_Lucena\_Papiol](https://community.temporal.io/u/Oscar_Lucena_Papiol)\
**Post date:** [October 14, 2024, 6:58am UTC](https://community.temporal.io/t/schedule-a-child-workflow-to-be-triggered-at-given-time/13742/3 "2024-10-14T06:58:24Z")

</div>

That is what we finally implemented.

We also tried to start the workflow on different namespace therefore couldn’t use startChild either.

Thanks!
