A trick for scheduling cron fortnightly?

Further to your answer about scheduling cron fortnightly, I saw this under the minutes entry of a crontab file: "*/5". I took it to mean any minute divided by five equals every five minutes. Therefore, if you put "*/2" under week, you'd get every fortnight. Is this right or wrong?
Alas, no. Type 'man 5 crontab' for the gory details, but in summary, no mathematics is possible. The /2 means "every second occasion specified before the slash". In your case, * for minutes means the full range of minutes: 0-59. Therefore /2 means every second minute. For weeks, crontab doesn't support ranges (eg 0-52), so use of a / is meaningless.
This was first published in June 2004

Dig deeper on Introduction to Linux system administration

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.



Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: