Cron to run 3rd Tuesday of every odd months


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Cron to run 3rd Tuesday of every odd months
# 8  
Old 08-27-2014
Referring to the bash manpage, && is a "control operator":
Code:
       AND and OR lists are sequences of one of more  pipelines  separated  by
       the  &&  and  || control operators, respectively.  AND and OR lists are
       executed with left associativity.  An AND list has the form

              command1 && command2

       command2 is executed if, and only if, command1 returns an  exit  status
       of zero.


Last edited by rbatte1; 08-27-2014 at 12:33 PM.. Reason: Add ICODE tags
This User Gave Thanks to junior-helper For This Post:
# 9  
Old 08-27-2014
Thank you for the great explanation. This has been really helpful.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

cron job on 3rd sunday of every month

Hi, Actually scheduled my test scripts on test severs as shown below. They are supposed to run on 3rd sunday of every month. Unfortunately it ran on 2nd sunday of the month (suspecting that it will run every sunday). I am sorry if I miss something. Could you please let me know if I did any... (1 Reply)
Discussion started by: System Admin 77
1 Replies

2. Shell Programming and Scripting

Cron job - Need to run Cron every quarter at particular time

Hi, 1) If some job supposed to run on 1st of every month at 7 AM In cron job when we have a blackout on the 1st ( i.e when 1st falls on a sunday ) how can we make the job run the next business day? 2) How can we run a job on 25th of every quarter 7 AM(jan,apr,jul,oct) And if 25th... (5 Replies)
Discussion started by: System Admin 77
5 Replies

3. Shell Programming and Scripting

Odd results when my script runs from cron..

Hi folks, So I wrote a script to run "top", "awk" out values fro the "top" and send the results to a data file. I then set it to run in cron every 15 minutes. Now I'm noticing that the script, and it's sub-commands are not always cleanly finishing and, in my investigations, I am also... (11 Replies)
Discussion started by: Marc G
11 Replies

4. Shell Programming and Scripting

Who -u gives different output if run from cron than if run from terminal?

If I run 'who -u' interactively or from a script invoked through bash in a tty on my Ubuntu 12LTS box I get an output like this: testuser pts/0 Dec 9 02:32 . 2163 (host.xx.yy) running the same through cron I get: testuser pts/0 2012-12-09 02:32 00:05 2163... (2 Replies)
Discussion started by: latimer
2 Replies

5. UNIX for Dummies Questions & Answers

[Solved] Cron - job to run every 3rd Friday of the month only

Hi Expert Please help me to set a cron job schedule, Ihave a job that run every 3rd Friday of the month at 1030am. I tried to set up like this, but the job still runs every friday at 1030am. I want the job to run every 3rd Friday of the month at 1030am only 30 10 15,16,17,18,19,20,21... (2 Replies)
Discussion started by: kaibiganmi
2 Replies

6. Shell Programming and Scripting

how to schedule the cron only if tuesday doesnot fall under 5 th and 25 th of jan

Hi I am new to unix. I have to set up a cron for the program , which should run every Monday at 3 a.m, however , if the date is between the 5 th and the 15th of January,APril or December, the program should not run I know i cant do this in cron , Help with writing the if contion is... (1 Reply)
Discussion started by: saiviren
1 Replies

7. UNIX for Dummies Questions & Answers

cron does not appear to run

Hi everyone, I am having a problem with a cron, I am using Solaris 10 and need to run a php file every 5 minutes. I can run the file from the test user, but the cron does not seem to run. I do not see anything about it in /var/cron/log but see crons for other users running. What should I look... (10 Replies)
Discussion started by: atomicbits
10 Replies

8. Shell Programming and Scripting

Cron to run first day of month to calculate date 3 months ago

Hi, I would like to find out how can i calculate a date which is 3 months ago. I intend to run a cron job on the 1st of every month, and calculate the month 4 months earlier from the date. For example, if today's date is 1st May 2007, i would like to return 012007( January 2007). i can get... (1 Reply)
Discussion started by: new2ss
1 Replies

9. UNIX for Dummies Questions & Answers

Where does cron run from?

I have a script in the same directory as some files and directories im trying to tar up and I have it run in cron. Well it runs but says it can't find the directories, you need to be in the directory where the script is for it to work. Here is my cron and script its crappy but it does the trick =).... (3 Replies)
Discussion started by: kingdbag
3 Replies

10. UNIX for Dummies Questions & Answers

root cron was override w/ 3rd party software

Hi Guys, I'm new in Unix Environment. Any Unix Guru around...I need help. My question is, is it possible that the root cron could be override with 3rd party software?How can it happen. Another thing, how the cron job works?, I mean how the Unix process the cron job , I don't have an idea... (2 Replies)
Discussion started by: kupal
2 Replies
Login or Register to Ask a Question