Skip to content

Correct when a scheduled Machine runs after create, start and update - #2695

Open
CheckPickerUpper wants to merge 1 commit into
superfly:mainfrom
CheckPickerUpper:scheduled-machine-start
Open

CheckPickerUpper wants to merge 1 commit into
superfly:mainfrom
CheckPickerUpper:scheduled-machine-start

Conversation

@CheckPickerUpper

Copy link
Copy Markdown

Summary of changes

The "Start a Machine on a schedule" section of fly machine run has two sentences that don't match what a scheduled Machine does:

  • "the cycle begins on the first machine start": an hourly Machine runs at the minute it was created, whenever it was first started.
  • "Scheduled machines cannot be started via flyctl or Machines API commands": fly machine start starts one, and the previous sentence in the docs tells readers to do that.

The section also doesn't say that fly machine update --skip-start stops a Machine's schedule until something starts it again. We hit that in a deploy script: it updated a scheduled Machine's image with --skip-start and never started it, so the Machine stopped running hourly.

I tested with flyctl v0.5.16 on one app in iad. Each Machine was a busybox image running sh -c 'date -u; sleep 5' with --schedule hourly. Times are UTC on 2026-11-29, from fly logs and fly machine status:

Machine What I did What happened
A fly machine create at 07:28:23, never started Never ran, through 11:28
B fly machine create at 07:28:24, fly machine start at 07:48:17 Next run at 08:28:00, 40 minutes after my start
B fly machine update --env PROBE=1 --skip-start at 08:28:44 No run at 09:28 or 10:28
B fly machine start at 10:30 Next run at 11:28:00
C fly machine run at 07:28:26 Ran at once, then at 08:28, 09:28, 10:28 and 11:28

fly machine start on a stopped scheduled Machine returns 200 with "previous_state":"stopped". On one that's still running, it returns 200 with "previous_state":"started" and doesn't start it twice.

I also checked a production Machine created at :15 past the hour. Our deploys update it with --skip-start and then start it, and it has kept running at :15.

Preview

One paragraph in machines/flyctl/fly-machine-run.mdx, under "Start a Machine on a schedule". The schedule section of fly machine update links to it.

Related Fly.io community and GitHub links

Notes

I only tested hourly, so the new sentences about the minute name hourly and say nothing about daily, weekly or monthly.

An hourly Machine runs at the minute it was created, not the minute it
was first started, and fly machine start does start a scheduled Machine.
fly machine update --skip-start stops the schedule until the Machine is
started again. Observed with flyctl v0.5.16 on hourly Machines in iad.
@CheckPickerUpper
CheckPickerUpper requested a review from a team as a code owner November 29, 2026 14:57
@mintlify

mintlify Bot commented Nov 29, 2026

Copy link
Copy Markdown

Preview approval required

This pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit f9e9a48.

Approve preview

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant