Repository navigation
Correct when a scheduled Machine runs after create, start and update - #2695
Open
CheckPickerUpper wants to merge 1 commit into
Open
CheckPickerUpper wants to merge 1 commit into
CheckPickerUpper wants to merge 1 commit into
Conversation
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.
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of changes
The "Start a Machine on a schedule" section of
fly machine runhas two sentences that don't match what a scheduled Machine does:hourlyMachine runs at the minute it was created, whenever it was first started.fly machine startstarts one, and the previous sentence in the docs tells readers to do that.The section also doesn't say that
fly machine update --skip-startstops 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-startand 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 runningsh -c 'date -u; sleep 5'with--schedule hourly. Times are UTC on 2026-11-29, fromfly logsandfly machine status:fly machine createat 07:28:23, never startedfly machine createat 07:28:24,fly machine startat 07:48:17fly machine update --env PROBE=1 --skip-startat 08:28:44fly machine startat 10:30fly machine runat 07:28:26fly machine starton a stopped scheduled Machine returns200with"previous_state":"stopped". On one that's still running, it returns200with"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-startand 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 offly machine updatelinks to it.Related Fly.io community and GitHub links
fly machine create --scheduleby hand.Notes
I only tested
hourly, so the new sentences about the minute namehourlyand say nothing aboutdaily,weeklyormonthly.