AWS 数据管道
您可以使用 AWS Data Pipeline安排具有给定时间段的任务。当您使用ShellCommandActivity配置管道时,该操作可以是任何命令。
您甚至可以使用现有的 EC2 实例运行命令:在您的 EC2 实例上设置Task RunnerworkerGroup
,并在您的 DataPipeline 上设置 ShellCommandActivity ( doc ) 时设置该字段:
{
"pipelineId": "df-0937003356ZJEXAMPLE",
"pipelineObjects": [
{
"id": "Schedule",
"name": "Schedule",
"fields": [
{ "key": "startDateTime", "stringValue": "2012-12-12T00:00:00" },
{ "key": "type", "stringValue": "Schedule" },
{ "key": "period", "stringValue": "1 hour" },
{ "key": "endDateTime", "stringValue": "2012-12-21T18:00:00" }
]
}, {
"id": "DoSomething",
"name": "DoSomething",
"fields": [
{ "key": "type", "stringValue": "ShellCommandActivity" },
{ "key": "command", "stringValue": "echo hello" },
{ "key": "schedule", "refValue": "Schedule" },
{ "key": "workerGroup", "stringValue": "yourWorkerGroup" }
]
}
]
}
限制:最小调度间隔为 15 分钟。
定价:每月约 1.00 美元。