LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   to run a job on every 1st and 3rd sunday of every month (https://www.linuxquestions.org/questions/linux-newbie-8/to-run-a-job-on-every-1st-and-3rd-sunday-of-every-month-4175512351/)

James0806 07-26-2014 09:25 AM

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

Philip Lacroix 07-26-2014 09:39 AM

What about this?

Code:

30 12 1,3 * sun /bin/ls

TB0ne 07-26-2014 01:23 PM

Quote:

Originally Posted by James0806 (Post 5209916)
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.


All times are GMT -5. The time now is 01:17 PM.