I’ve set a machine to run on an hourly schedule. The schedule works. However, it is not possible to manually start/restart the machine.
fly machines update <REDACTED> --schedule=hourly
[
{
"id": "<REDACTED>",
"name": "<REDACTED>",
"state": "stopped",
"region": "syd",
"image_ref": {
"registry": "registry.fly.io",
"repository": "<REDACTED>",
"tag": "deployment-<REDACTED>",
"digest": <REDACTED>",
},
"instance_id": "01JK4HEV8295G2CZ5Q6DW6DJP0",
"private_ip": "<REDACTED>",
"created_at": "2025-01-15T03:33:28Z",
"updated_at": "2025-02-02T23:56:40Z",
"config": {
"env": {
<REDACTED>
},
"init": {},
"guest": {
"cpu_kind": "shared",
"cpus": 1,
"memory_mb": 1024
},
"metadata": {
"fly_flyctl_version": "0.3.72",
"fly_platform_version": "v2",
"fly_process_group": "app",
"fly_release_id": "<REDACTED>",
"fly_release_version": "85"
},
"image": "registry.fly.io/<REDACTED>",
"schedule": "hourly",
"restart": {
"policy": "on-failure",
"max_retries": 10
}
},
"events": [
<REDACTED>
],
"host_status": "ok"
}
]
fly machines stop <REDACTED>
Sending kill signal to machine <REDACTED> has been successfully stopped.
fly machines restart <REDACTED>
Restarting machine <REDACTED>
Error: failed to restart machine <REDACTED>: could not stop machine <REDACTED>: failed to restart VM <REDACTED>: failed_precondition: machine still active, refusing to start (Request ID: 01JK4HWJFGS3MX011DBMST8NB4-syd)
fly machines start <REDACTED>
Error: could not start machine <REDACTED>: failed to start VM <REDACTED>: failed_precondition: machine still active, refusing to start (Request ID: 01JK4HXKDTZFSQVGWCMV3WEH4X-syd)`
Seems to me that I should be able to start/restart a scheduled machine, just like any other machine.
Even if the schedule is set to a new time within the hour, we don’t have a choice when in the hour the machine runs on the hourly schedule anyway, and it is of no consequence to me if the scheduled time changes due to start/restart. I only care that it runs once an hour… and that I can manually start/restart whenever I want).