Verifying services.script_checks is supported

Howdy;
I saw this chunk in the fly.toml of a fly tutorial
[[services.script_checks]]

But couldn’t find the details in the docs

I just wanted to confirm that script_checks is still supported. If I’m greedy I’d also love docs, but it’s pretty understandable from the GithHub repo.

Thanks a bunch. Fly makes me swoon.

1 Like

It is supported, not documented yet. We use it ourselves for a few apps.

Here’s what it may look like:

  [[services.script_checks]]
  command       = "/path/to/your/script"
  args          = ["a", "b", "c"]
  grace_period  = "1s"
  interval      = "5s"
  restart_limit = 0
  timeout       = "1s"
1 Like

Fantastic! Thanks @jerome. What’s the grace_period allow?

It’s the delay before starting the health checks after your instance has been started.

Thank you!

Will it work for daily checks with interval = "86400s" on a Hobby plan?

@beshur I don’t think this feature is going to be available in the long term based on some other messages in the forum. @jerome can you confirm one way or the other?

We ended up using supervisord based on the guide here: Running Multiple Processes Inside A Fly.io App · Fly Docs

Does anyone know how to specify a script_checks for apps without a service?

Has this feature been removed as @eyepulp says?

I currently have this in my fly.toml:

  [[services.script_checks]]
    command       = "/app/health_check.sh"
    grace_period  = "2s"
    interval      = "5s"
    restart_limit = 0
    timeout       = "1s"

The referenced script returns exit 1 and does not fail the deploy.

Running flyctl checks list only shows servicecheck-01-http-8080 and servicecheck-00-tcp-8080 regardless of if the script returns exit 1 or 0.

I can execute health_check.sh when using flyctl ssh console no problem.

I’ve also tried putting gibberish:

command       = "nonsense"

And tried adding bash:

command       = "bash /app/health_check.sh"

With similar results.

I have the exact same problem. Any help/ideas? Or has the feature indeed been removed?

script_checks doesn’t exist in Apps v2.