I have some jobs that only need to be run periodically and to reduce costs & scale down to zero I want to run a scheduled machine hourly. I have an app already that has 2 instances that auto-start and auto-stop, down to a minimum of 0 instances, and I am attempting to add an additional machine that will run the on the schedule:
fly machines run . --schedule=hourly --region syd -a <my-app>
However, when I do this, I can see the machine start, run the job for the first time but after it exits it immediately starts again. I initially thought it might be because I wasn’t returning a
0 exit code, but even when I do this the same behaviour is continuing.
I can see in the logs that the my job completes successfully, but there some logging after this point that leads me to believe something isn’t entirely right:
2023-06-01T08:29:05.408 app[9080eed0b1de48] syd [info] Starting clean up. 2023-06-01T08:29:05.409 app[9080eed0b1de48] syd [info] hallpass exited, pid: 514, status: signal: 15
Signal 15 being a SIGTERM I believe.
Am I doing something wrong here or is this an issue with Fly? Thanks in advance!