How to keep a fly machine awake with a long running task

Hi,

I have a service that is rarely used, but it has a long running task inside that needs to complete.

It picks up work via nats.io jetstream, but I don’t really want to leave it running all the time as its only used sparingly.

I know I can start the machine up by sending a request to the fly proxy, but is there something the macnine can do while its running to stop itself being shutdown before its finished its work?

Thanks

Dean

You can disable autostop and exit your main process when you’re ready to shut down. If you have autostart enabled and autostop disabled, the Fly proxy will start your machine when it’s stopped but won’t stop your machine at all on its own.

Hi Scott,

That’s perfect. Thank you very much for the info.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.