Sha256: 650f4ea1db3375441e6f840bb994f51dd484e160ebdbb7f75617822396407a75

Contents?: true

Size: 1.05 KB

Versions: 8

Compression:

Stored size: 1.05 KB

Contents

---
title: Run Single Task
---

Sometimes you do not want to run a long running `service` but a one time task. Running Rails migrations are an example of a one off task.  Here is an example of how you would run a one time task.

```
ufo task hi-web --command bundle exec rake db:migrate
```

At the end of the output you should see you the task ARN:

```sh
$ ufo task hi-web --command bundle exec rake db:migrate
...
Running task_definition: hi-web
Task ARN: arn:aws:ecs:us-west-2:994926937775:task/a0e4229d-3d39-4b26-9151-6ab6869b84d4
$
```

You can describe that task for more details:

```sh
aws ecs describe-tasks --tasks arn:aws:ecs:us-west-2:994926937775:task/a0e4229d-3d39-4b26-9151-6ab6869b84d4
```

You can check out the [ufo task](http://ufoships.com/reference/ufo-task/) reference for more details.

<a id="prev" class="btn btn-basic" href="{% link _docs/run-in-pieces.md %}">Back</a>
<a id="next" class="btn btn-primary" href="{% link _docs/migrations.md %}">Next Step</a>
<p class="keyboard-tip">Pro tip: Use the <- and -> arrow keys to move back and forward.</p>

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ufo-3.5.7 docs/_docs/single-task.md
ufo-3.5.6 docs/_docs/single-task.md
ufo-3.5.5 docs/_docs/single-task.md
ufo-3.5.4 docs/_docs/single-task.md
ufo-3.5.3 docs/_docs/single-task.md
ufo-3.5.2 docs/_docs/single-task.md
ufo-3.5.1 docs/_docs/single-task.md
ufo-3.5.0 docs/_docs/single-task.md