0 0/10 * * * Cron Expression Meaning

3 min read Jun 08, 2024
0 0/10 * * * Cron Expression Meaning

Cron Expression: 0 0/10 * * * Meaning

Cron expressions are used to schedule tasks to run at specific intervals. They consist of five or six fields, separated by spaces, that define the timing of the task. In this article, we'll break down the meaning of the cron expression 0 0/10 * * *.

Field 1: Minute (0)

The first field specifies the minute of the hour when the task should run. In this case, the value is 0, which means the task will run at the beginning of the hour (on the hour).

Field 2: Hour (0/10)

The second field specifies the hour of the day when the task should run. The value 0/10 means the task will run every 10 hours, starting from 0 (midnight). This means the task will run at 0:00, 10:00, 20:00, and so on.

Field 3: Day of the Month (*)

The third field specifies the day of the month when the task should run. The asterisk (*) is a wildcard character, which means the task will run every day of the month.

Field 4: Month (*)

The fourth field specifies the month of the year when the task should run. Again, the asterisk (*) is a wildcard character, which means the task will run every month of the year.

Field 5: Day of the Week (*)

The fifth and final field specifies the day of the week when the task should run. Once again, the asterisk (*) is a wildcard character, which means the task will run every day of the week.

Summary

In summary, the cron expression 0 0/10 * * * means the task will run:

  • At the beginning of every hour (on the hour)
  • Every 10 hours, starting from midnight
  • Every day of the month
  • Every month of the year
  • Every day of the week

This cron expression is suitable for tasks that need to run frequently, but not continuously.

Featured Posts