Recurring scheduled tasks (like cron)

I have some use cases where the batch job wants to run with higher privileges than the normal. To illustrate, consider a service with a read-only connection to a data store, and a batch job that updates the data store (in reality, it’s less write access vs more write access).

In another case, they’re even using different software stacks – the always-on VM is a webapp dictated by frameworks to be NodeJS, while the batch jobs are Deno or Go.

It would be great to schedule a “start this VM every X minutes” kind of a thing, where the VM exits when the batch is done.

If you’re worried about old school cron style overruns (the previous instance is still alive when a new one is started), well, you already need to handle that right with block devices! Use that solution. (Ideally in a way that doesn’t waste 1GB for no reason.)

1 Like