Cron jobs
Run a container command on a validated schedule and timezone.
A deployed cron service stays at zero replicas between runs. At each due occurrence, Replov starts one Docker Swarm task from the deployed image. The task is not automatically restarted after it exits, and a still-running task prevents an overlapping occurrence from starting.
Current behavior
Standard five-field cron expressions
IANA timezones such as Asia/Kolkata or UTC
A distributed per-minute lock across backend replicas
Next run, last run and total run values stored with the service
Build and runtime output available through service logs
Stopping the service disables future scheduled runs
Billing
A cron job pays only for the time its runs take. Each finished run is charged at the compute tier's per-minute rate (on Nano, about ₹0.0045 a minute), rounded up to whole minutes with at least one minute per run. Nothing is charged between runs, and an occurrence that is skipped or never starts is free.
Schedule syntax
minute hour day-of-month month day-of-week* * * * *
| Expression | Meaning |
|---|---|
| */5 * * * * | Every five minutes |
| 0 * * * * | Every hour |
| 0 0 * * * | Every day at midnight |
| 0 9 * * 1-5 | Weekdays at 09:00 |
Set up a cron service
- Create a cron service from the dashboard and select the repository and compute plan.
- Set a start command that performs one job and exits with zero on success.
- Enter a five-field schedule and an IANA timezone.
- Deploy once to build and register the zero-replica Swarm service.
- Use the service logs and next-run value to verify scheduled execution.
async function run() {console.log('Cleanup started', new Date().toISOString());// Perform one bounded unit of work here.console.log('Cleanup finished');}run().catch((error) => {console.error(error);process.exitCode = 1;});