Built in tasks

Some useful library tasks that can simplify your life.


ShellTask can be used to run any shell command. stdout and stderr is forwarded to the task log.


Input Type Description
command string Shell command to execute
env dict Environment

Returns: shell command return code (integer)

from cowait.tasks.shell import ShellTask

async def MyTask():
    await ShellTask(command='ls')
# Example using the CLI
cowait run cowait.tasks.shell --input command=ls


ContainerTask can be used to launch and monitor any Docker container. This can be useful for setting up side-car containers. Container logs are forwarded to the task log.


Input Type Description
name string Task Name
image string Docker image name
env dict Environment variables
routes Route Dict
ports Port Dict
cpu string CPU allocation
memory string Memory allocation
from cowait.tasks.container import ContainerTask

async def MyTask():
    await ContainerTask(
# Example using the CLI
cowait run cowait.tasks.container --input name="mongodb-task" -i image=mongo

Found incorrect information, typos or have other suggestions to this documentation page?

Edit on Github