Problem solve Get help with specific problems with your technologies, process and projects.

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 last published in June 2004

Dig Deeper on Linux servers



Find more PRO+ content and other member only offers, here.

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.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.