run-task - Cloud Foundry CLI Reference Guide


名称

run-task - 在应用程序上运行一次性任务

用法

cf run-task APP_NAME COMMAND [-k DISK] [-m MEMORY] [--name TASK_NAME]

TIP

Use 'cf logs' to display the logs of the app and all its tasks. If your task name is unique, grep this command's output for the task name to view task-specific logs.

EXAMPLES

cf run-task my-app "bundle exec rake db:migrate" --name migrate

别名

rt

选项

-k

磁盘限制(例如,256M、1024M、1G)

-m

内存限制(例如,256M、1024M、1G)

--name

指定给任务的名称(如果省略,系统会自动生成)

另请参阅

logs, tasks, terminate-task