Skip to main content
Vertra Cloud keeps your process running around the clock, so a recurring task is simply a scheduler inside your code. A job that doesn’t serve HTTP runs as a background application, which doesn’t need web publishing and fits the smaller plans.

Choose where the job lives

  • Inside your existing app: simplest, if the job is light and shares code with it.
  • In a separate background application: better if the job is heavy or you don’t want it to compete with requests for memory. It restarts and scales on its own.

Node.js

index.js

Python

main.py
BlockingScheduler keeps the process alive. With a script that ends after scheduling, the process exits with code 0 and isn’t restarted.

Things to get right

Don’t depend on the container’s clock zone: pass the timezone to the scheduler explicitly, as in the examples.
A restart during a job means it may run again. Record what was processed, or design the job so a second run changes nothing.
An unhandled error can take the whole process down, and 5 crashes in 10 minutes pause auto-restart for 24 hours. Wrap the job body in try/catch and log the failure.
Print a line when a job starts and ends; the Logs tab is where you’ll check that it ran. In Python use flush=True so the line appears immediately.