Run a job every 10 minutes
The cron expression for every 10 minutes is */10 * * * *. The */10 step in the minute field fires at :00, :10, :20, :30, :40 and :50, six times an hour and 144 times a day.
crontab syntax · 5 fields
*/10****Next 5 runs
Vercel always runs schedules in UTC, and GitHub Actions does unless you set a time zone. Crontab and Kubernetes use the server's time zone.
Field by field
*/10Minute- Every 10th minute: 0, 10, 20 … 50
*Hour- Every hour, 0 to 23
*Day of month- Every day of the month
*Month- Every month
*Day of week- Every day of the week
By platform
Most schedulers take the same five fields. The wrapper, time zone and limits differ.
crontab -e
# m h dom mon dow command
*/10 * * * * /usr/local/bin/sync.sh >> /var/log/sync.log 2>&1Runs in the server's local time zone
Cron starts jobs with a minimal environment: use absolute paths, and send output to a log so failures don't disappear.
.github/workflows/sync.yml
on:
schedule:
- cron: "*/10 * * * *"Runs in UTC unless you set a time zone
Add
timezone next to cron to use local time. Runs often start late when GitHub is busy, most of all at the start of an hour. In a public repository, GitHub turns the schedule off after 60 days without activity.cronjob.yaml (excerpt)
spec:
schedule: "*/10 * * * *"
timeZone: "Etc/UTC"
concurrencyPolicy: ForbidWithout timeZone, the controller's zone applies
Set timeZone to pin the schedule. concurrencyPolicy: Forbid stops a slow run from overlapping the next one.
AWS CLI
aws events put-rule \
--name sync-every-10-minutes \
--schedule-expression "cron(0/10 * * * ? *)"Six fields, and one day field must be ?
EventBridge adds a year at the end and needs
? in day-of-month or day-of-week. For a plain interval, rate(10 minutes) is simpler, though its runs are timed from when you create the rule rather than by the clock.vercel.json
{
"crons": [
{ "path": "/api/sync", "schedule": "*/10 * * * *" }
]
}Needs a paid plan
On Hobby, cron jobs run at most once a day, so this schedule fails at deploy time. Vercel runs crons in UTC.
Other 10-minute schedules
Start the step at another minute to move runs off the round tens, or narrow the hour and weekday fields.
| Expression | Runs |
|---|---|
0,10,20,30,40,50 * * * * | Same as */10 * * * *, with the minutes listed |
5-59/10 * * * * | Every 10 minutes at :05, :15, :25, :35, :45 and :55 |
*/10 9-17 * * 1-5 | Every 10 minutes from 09:00 through 17:50, Monday through Friday |
*/10 * * * 1-5 | Every 10 minutes, all day, Monday through Friday |