How */5 works
The first of the five fields is the minute. */5 means "every minute from 0 to 59 that is divisible by 5", so the job runs at :00, :05, :10 … :55 – aligned to the clock, not to the moment you saved the crontab. The other four * mean every hour, day, month and weekday.
Do not confuse it with 5 * * * *, which runs once an hour, at five past.
Variants
*/10 * * * * every 10 minutes
*/15 * * * * every 15 minutes (:00, :15, :30, :45)
2-59/5 * * * * every 5 minutes, offset by 2 (:02, :07 …)
*/5 9-17 * * 1-5 every 5 minutes during office hours, Mon–Fri
An offset like 2-59/5 spreads load when many jobs would otherwise start at the same second.
Questions
How do I write the crontab line?
Expression, then the command: */5 * * * * /usr/local/bin/backup.sh. Edit it with crontab -e; use absolute paths, because cron runs with a minimal environment.
Can cron run every 5 seconds?
Classic Unix cron cannot go below one minute. Schedulers with a seconds field (Quartz, Spring, node-cron) accept */5 * * * * * – type six fields above and the explainer handles them.
Does it work in GitHub Actions?
Yes, but five minutes is the shortest interval GitHub allows, schedules run in UTC, and runs can be delayed when GitHub is busy.