anchor.diff:  ---
   title: Running Tasks
  -owner: CAPI
  +owner: CAPI/CLI
   ---
   
   This topic describes how to run tasks in Cloud Foundry. A task is an app or script whose code is included as part of a deployed app, but runs independently in its own container.
  
positive.code: If your task name is unique, you can `grep` the output of the `cf logs` command for the task name to view task-specific logs.
  
  
  ## <a id='list-tasks'></a> List Tasks Running on an App
  
  To list the tasks for a given app, run the `cf tasks APP-NAME`. For example:
  
negative.code: <%= partial 'tasks_rec_alloc_oss' %>
  <% end %>
  
  ## <a id='run-tasks'></a> Run a Task on an App using a v6 cf CLI
  
  You can use the Cloud Foundry Command Line Interface (cf CLI) to run a task in the context of an app.
  
  <<<<<<< HEAD
  <p class="note"><strong>Note:</strong> To run tasks with the cf CLI, you must install cf CLI v6.23.0 or later. For information about downloading, installing, and uninstalling the cf CLI, see the <a href="../cf-cli/install-go-cli.html">Installing the Cloud Foundry Command Line Interface</a>.</p>
  
  <p class="note"><strong>Note:</strong> To run a task without starting the app, push the app with <code>cf push -i 0</code> and then run the task. You can run the app later by scaling up its instance count.</p>
  
  To run a task on an app:
  =======
  <p class="note"><strong>Note</strong>: To run tasks with the cf CLI, you must install cf CLI v6.23.0 or later, or use a v7 cf CLI (see below). See the <a href="../cf-cli/install-go-cli.html">Installing the Cloud Foundry Command Line Interface</a> topic for information about downloading, installing, and uninstalling the cf CLI.</p>
  
  <p class="note"><strong>Note</strong>: To run a task on v6 cf CLI without starting the app, push the app with <code>cf push -i 0</code> and then run the task. You can run the app later by scaling up its instance count.</p>
  >>>>>>> a970f76882731d28a0308f2f0d8c63853c0fbcba
  
  1. Push your app by running:
  
  <<<<<<< HEAD
  	```
  	cf push APP-NAME
  	```
  =======
  To run a task on an app using a v6 cf CLI, perform the following steps:
  >>>>>>> a970f76882731d28a0308f2f0d8c63853c0fbcba
  
  1. Run your task on the deployed app by running:
  	```
  