Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-12-2015, 06:21 AM   #1
Registered: Jan 2014
Posts: 100

Rep: Reputation: Disabled
crontab queries


Is it possible to schedule a cron job runs every quarter of the year? If so, how to go about it?

Thanks in advance.
Old 05-12-2015, 07:54 AM   #2
Senior Member
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 2,451

Rep: Reputation: 891Reputation: 891Reputation: 891Reputation: 891Reputation: 891Reputation: 891Reputation: 891
Do you mean EXACTLY 1/4 of the year?

If you mean like on the 1st of the month each quarter then why not just specify the four months in the month field, e.g.

00 00 01 1,4,7,10 * /path/to/whatever
Old 05-12-2015, 03:17 PM   #3
Senior Member
Registered: Jun 2005
Location: England
Distribution: openSUSE, Fedora, CentOS
Posts: 1,093

Rep: Reputation: 197Reputation: 197
One problem with your question is that a year isn't a fixed length.

If you went with the average length of a year, 365.242 days, turn that in to hours and divide by four and round down, you get 2191. So run the cronjob every 2191 hours

0 */2191 * * * cmd
This is almost certainly not what you want.

Unless what you want is what TenTenths suggested then you need to rephrase your question.


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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Problem with crontab:: command not executed properly via crontab Ankush Seth Linux - Newbie 11 11-11-2013 06:25 AM
DIff B/w Crontab -l & crontab -e Tareq9959 Linux - Newbie 2 05-14-2013 08:27 AM
linux crontab vs unix crontab ytd Linux - General 2 08-09-2009 05:07 AM
replaced crontab, now should get crontab back to what it was raminn Linux - Newbie 2 10-20-2008 07:15 PM
system-wide crontab in /etc/crontab ner Linux - General 2 11-18-2003 12:35 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:07 PM.

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