Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 10-14-2010, 03:54 PM   #1
LQ Newbie
Registered: Dec 2006
Posts: 19

Rep: Reputation: 0
Configure cron entry to run every other Friday?

I have a requirement that a job run at a particular time every other Friday. I was wondering if I can configure cron to do this - perhaps using the /step feature?

For example, can I do the following?

0 21 * * 5/2 /my/command

If this works, how does it decide when to begin skipping? In other words, where is the first Friday? Is it the first Friday of the Year? of the Month?

I would just try it, but it would be an awful long time to wait to see whether or not it is working.

Old 10-14-2010, 04:13 PM   #2
LQ Newbie
Registered: Sep 2005
Distribution: Debian/RedHat/Turbo
Posts: 15

Rep: Reputation: 0
Since my version of cron doesn't support the step feature, I've come up with another solution to this very question.
I've written logic into my script to check for the existence of a "lock" file. If the lock file exists, simply remove it and exit, if it does not exist, do whatever needs doing, create the lock file and exit.

This way my cron entry is simply
0 21 * * 5


cron, crontab

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I set Plesk Crontab to only run a job on Friday? gogoskiracer Linux - Newbie 10 05-16-2009 02:57 AM
cron entry doesn't start kpachopoulos Linux - General 3 01-29-2008 07:46 PM
Cron Job to run on 2nd and 4th Friday of each month rust8y Linux - General 1 06-25-2007 10:07 PM
will this cron entry do what I want it to? microsoft/linux Debian 4 01-12-2006 07:29 PM
Cron job to run every monday wednesday and friday...? init Linux - General 4 07-29-2004 12:24 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:04 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration