LoginSignup
4
0

More than 3 years have passed since last update.

Heroku Schedulerは --type=web のDockerコンテナしか実行しない

Last updated at Posted at 2019-09-07

Herokuのアドオンの Heroku Scheduler は非常に便利なのですが、Dockerで構築した Container Registry で利用するには注意があります。

--type=web のコンテナしか実行されません

Heroku Scheduler でのジョブの登録時に type の指定がないから変だと思ったのですよね・・・。

以下のコマンドでデプロイしたコンテナを Heroku Scheduler は参照します。

heroku container:push web --app [APP_NAME]
heroku container:release web --app [APP_NAME]

以下のように worker を指定したものは無視されます。
ログには指定したコマンドの実行が1行出力されるだけでエラーも出力されません。

heroku container:push worker --app [APP_NAME]
heroku container:release worker --app [APP_NAME]

おまけ

以下は、Herokuの公式ドキュメントの引用です。
2019年9月8日時点のものです。

Heroku Scheduler and Container Registry

If you are using Heroku Scheduler and Container Registry as your deployment method, your task must be accessible from the web image. There is no way to specify a non-web image for task execution.

4
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
0