我目前正在使用亚马逊的弹性beanstalk作为我的网络服务器 . 我需要能够每分钟运行一些cron作业(因此启动机器并关闭它们不是一种选择) .
我现在找到的解决方案是:
运行ec2机器并在那里运行那些cron
使用设置有点复杂的aws操作最终会运行ec2机器 .
这两种解决方案似乎都是过度杀戮 . 那里有更好的解决方案吗?完美的解决方案将是“平台即服务”(PaaS)之一 .
谢谢
看起来可以在Beanstalk中直接执行:
AWS Elastic Beanstalk, running a cronjob
如果要运行的 endpoints 是面向外部的(到Web),您可以检查Azure Scheduler:
http://azure.microsoft.com/en-us/services/scheduler/
好吧,几年后 . 以下是处理此问题的一些新选项:
_________,如亚当所说,有一个选项可以在名为"container commands"的弹性beanstalks配置中设置重复事件 . 行为如下代码: container_commands: name of container_command: command: "command to run" leader_only: true name of container_command: command: "command to run" reference:http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-ec2.html#linux-container-commands
container_commands: name of container_command: command: "command to run" leader_only: true name of container_command: command: "command to run"
希望这能帮助任何碰到这个问题的人
2 回答
看起来可以在Beanstalk中直接执行:
AWS Elastic Beanstalk, running a cronjob
如果要运行的 endpoints 是面向外部的(到Web),您可以检查Azure Scheduler:
http://azure.microsoft.com/en-us/services/scheduler/
好吧,几年后 . 以下是处理此问题的一些新选项:
_________,如亚当所说,有一个选项可以在名为"container commands"的弹性beanstalks配置中设置重复事件 . 行为如下代码:
container_commands: name of container_command: command: "command to run" leader_only: true name of container_command: command: "command to run"
reference:http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-ec2.html#linux-container-commands希望这能帮助任何碰到这个问题的人