# 提供在没有任何手动确认“你确定吗”的情况下运行“./launcher cleanup”命令的能力，以便可以在Cron中调度

**URL:** https://meta.discourse.org/t/provide-an-ability-to-run-the-launcher-cleanup-command-without-any-manual-are-you-sure-confirmations-so-to-make-it-schedulable-in-cron/65842
**Category:** Feature
**Created:** [2017 年7 月 8 日 03:31 UTC](https://meta.discourse.org/t/provide-an-ability-to-run-the-launcher-cleanup-command-without-any-manual-are-you-sure-confirmations-so-to-make-it-schedulable-in-cron/65842 "2017-07-08T03:31:06Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![dmitry\_fedyuk](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dmitry_fedyuk/32/293153_2.png) [@dmitry\_fedyuk](https://meta.discourse.org/u/dmitry_fedyuk)
#### Post date: [2017 年7 月 8 日 03:31 UTC](https://meta.discourse.org/t/provide-an-ability-to-run-the-launcher-cleanup-command-without-any-manual-are-you-sure-confirmations-so-to-make-it-schedulable-in-cron/65842/1 "2017-07-08T03:31:06Z")

</div>

> <https://github.com/discourse/discourse_docker/blob/master/launcher#L386-L406>

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [2017 年7 月 8 日 03:41 UTC](https://meta.discourse.org/t/provide-an-ability-to-run-the-launcher-cleanup-command-without-any-manual-are-you-sure-confirmations-so-to-make-it-schedulable-in-cron/65842/2 "2017-07-08T03:41:37Z")

</div>

That can be achieved today using the `yes` command.

```plaintext
yes | ./launcher cleanup

```

---

<div class="post-metadata">

### Author: ![MarcP](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marcp/32/160184_2.png) [@MarcP](https://meta.discourse.org/u/MarcP)
#### Post date: [2023 年2 月 26 日 01:22 UTC](https://meta.discourse.org/t/provide-an-ability-to-run-the-launcher-cleanup-command-without-any-manual-are-you-sure-confirmations-so-to-make-it-schedulable-in-cron/65842/3 "2023-02-26T01:22:03Z")

</div>

我们还能让它正常工作吗？

```plaintext
yes | ./launcher cleanup
WARNING! This will remove all stopped containers.
Are you sure you want to continue? [y/N] Total reclaimed space: 0B
WARNING! This will remove all images without at least one container associated to them.
Are you sure you want to continue? [y/N] y

```

最后的 Y 是手动输入的，以使清理继续进行。

---

<div class="post-metadata">

### Author: ![dmitry\_fedyuk](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dmitry_fedyuk/32/293153_2.png) [@dmitry\_fedyuk](https://meta.discourse.org/u/dmitry_fedyuk)
#### Post date: [2024 年9 月 20 日 02:00 UTC](https://meta.discourse.org/t/provide-an-ability-to-run-the-launcher-cleanup-command-without-any-manual-are-you-sure-confirmations-so-to-make-it-schedulable-in-cron/65842/4 "2024-09-20T02:00:02Z")

</div>

> <https://github.com/dmitrii-fediuk/5.9.188.84/blob/2024-09-20/etc/crontab#L26-L26>
