LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 07-26-2014, 10:25 AM   #1
James0806
Member
 
Registered: Jul 2014
Posts: 30

Rep: Reputation: Disabled
to run a job on every 1st and 3rd sunday of every month


How to run a cronjob for every first and third sunday of every month
will this work
30 12 1-7,15-21 * 0 /bin/ls
when im trying to do this this is not working
 
Old 07-26-2014, 10:39 AM   #2
Philip Lacroix
Member
 
Registered: Jun 2012
Distribution: Slackware{,-current}, OpenBSD
Posts: 361

Rep: Reputation: 377Reputation: 377Reputation: 377Reputation: 377
What about this?

Code:
30 12 1,3 * sun /bin/ls
 
Old 07-26-2014, 02:23 PM   #3
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,916

Rep: Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689
Quote:
Originally Posted by James0806 View Post
How to run a cronjob for every first and third sunday of every month
will this work
30 12 1-7,15-21 * 0 /bin/ls
when im trying to do this this is not working
It would help if you told us what "not working" means; does this mean the script doesn't run at ALL? Runs at the wrong times/days/dates? Version/distro of Linux???

This:
http://www.linuxquestions.org/questi...2/#post4654486

...has some tips with examples on how to set up a 'complex' cron job like this. Should get you going, but you'll have to modify it to fit your needs.
 
  


Reply

Tags
cronjobs, linux command


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] Scheduling a CRON job to run on the first Sunday of the month New2Linux2 Linux - Software 10 11-08-2016 01:25 PM
cron job to run on 2-27 every month excluding Sundays Iyyappan Linux - Server 12 06-04-2014 05:20 AM
[SOLVED] cron job to run 1st Tue of month and at random time between 3am and 4am keif Programming 6 05-29-2014 04:58 PM
[SOLVED] Run a Cron Job on Last Thursday of Every Month devUnix Linux - General 6 11-01-2013 10:09 AM
[SOLVED] How to run a script on first sunday of every month jayakumar01 Linux - Server 2 05-29-2012 03:40 PM


All times are GMT -5. The time now is 06:00 AM.

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