Execute Tasks Every Ten Minutes | CronBase

cron expression Standard
$ */10 * * * *

Every ten minutes, continuously throughout the day, every day of the week, and every month of the year.

The `*/10 * * * *` cron expression schedules a task to run automatically every ten minutes. This execution occurs at the start of every ten-minute interval throughout the hour, specifically at minutes zero, ten, twenty, thirty, forty, and fifty, recurring continuously every day of the year.

Minute
*/10
Hour
*
Day of Month
*
Month
*
Day of Week
*

Next 5 Runs

  • in 1m 41s
  • in 11m 41s
  • in 21m 41s
  • in 31m 41s
  • in 41m 41s

* Tools

Code & Implementations

nodejs
const cron = require('node-cron');
// Schedule task to run every 10 minutes safely
let isRunning = false;
cron.schedule('*/10 * * * *', async () => {
    if (isRunning) {
        console.warn('[Warning] Previous execution still running. Skipping this interval.');
        return;
    }
    isRunning = true;
    try {
        console.log(`[${new Date().toISOString()}] Starting database cleanup...`);
        await performCleanup();
    } catch (error) {
        console.error('[Error] Execution failed:', error);
    } finally {
        isRunning = false;
    }
});
async function performCleanup() {
    // Simulated async operation
    return new Promise(resolve => setTimeout(resolve, 2000));
}
Setup notes

Install node-cron using npm install node-cron, then run this file using node scheduler.js. The process must run as a background daemon using a manager like PM2.

Partner BetterStack

Monitor this schedule in production

Get alerted the moment this cron job fails, is late, or doesn't run. BetterStack tracks execution, duration, and output — no infrastructure required.

Platform Equivalents

AWS EventBridge

Standard cron expressions often need conversion for AWS EventBridge schedules.

EventBridge Rule
cron(*/10 * * * ? *)

Systemd Timer

OnCalendar*-*-* *:00/10:00

my-task.timer
[Unit]
Description=Timer for cron expression: */10 * * * *

[Timer]
OnCalendar=*-*-* *:00/10:00
Persistent=true

[Install]
WantedBy=timers.target

Frequently Asked Questions

What happens if a job takes longer than 10 minutes to run?

If a job exceeds the 10-minute window, standard cron will launch a concurrent instance. To prevent resource starvation and race conditions, use locking tools like flock in Bash, or set concurrencyPolicy: Forbid in Kubernetes CronJobs to ensure only one instance runs at a time.

How can I stagger this job to avoid peak-hour load spikes?

Instead of running exactly on the tens (0, 10, 20...), you can introduce a minute offset. For example, using '3-59/10 * * * *' will run at minutes 3, 13, 23, 33, 43, and 53, shifting your resource usage away from other system tasks that trigger on the hour.

Will timezone shifts or Daylight Saving Time affect this 10-minute schedule?

Because the interval is highly frequent and hourly, Daylight Saving Time transitions will not cause missed intervals, though the system clock offset change might briefly make one interval appear to take 70 minutes or run instantly. Running your system cron daemon in UTC is highly recommended to guarantee absolute consistency.

How should I handle logging for a job that runs this frequently?

Running 144 times a day can generate significant log volume. Implement log rotation with compression, avoid verbose debug logging in production, and redirect standard output to structured JSON logs. Ensure you include a unique execution ID for each run to facilitate easy log aggregation and debugging.

Is this cadence suitable for polling external APIs?

Yes, a 10-minute interval is highly suitable for non-realtime API polling. However, you must handle network timeouts gracefully. Set explicit connection and read timeouts (e.g., 30 seconds) in your HTTP client to prevent hanging sockets from blocking future scheduled runs.

* Explore

Related expressions you might need

Was this helpful?

Last verified: