Difference between these cron commands


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Difference between these cron commands
# 1  
Old 05-14-2012
Difference between these cron commands

Hi all I want to make sure I was understanding this correctly

if a cron job command was

Code:
* */20 * * * command

does that mean this command will run every 20 hours?

also what is the difference between the following two?

Code:
0,20,40 * * * * command

Code:
20 * * * * command

I believe the first one runs the command at 0, 20 and 40 minutes while the other runs every 20 minutes. . but I am not sure. ThanksSmilie
# 2  
Old 05-14-2012
sorry bad post

Last edited by 47shailesh; 05-14-2012 at 01:27 PM.. Reason: messed up with minutes and hour fields sorry
This User Gave Thanks to 47shailesh For This Post:
# 3  
Old 05-14-2012
First cron: Hourly except at 20:00 . What did you intend? I'm assuming that this certain editions of Linux because the syntax is invalid in unix.

Second cron: every 20 mins (On the hour; twenty minutes past the hour; and forty minutes past the hour).

Third cron: At 20 minutes past every hour.

Last edited by methyl; 05-14-2012 at 01:34 PM.. Reason: update /20
This User Gave Thanks to methyl For This Post:
# 4  
Old 05-14-2012
Quote:
Originally Posted by methyl
First cron: Hourly except at 20:00 . What did you intend? I'm assuming that this certain editions of Linux because the syntax is invalid in unix.

Second cron: every 20 mins (On the hour; twenty minutes past the hour; and forty minutes past the hour).

Third cron: At 20 minutes past every hour.
I'm just learning syntax differences. Thank you for your reply I appreciate it!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Difference between commands

i need to know the difference between two commands ps -ef|grep oracle ps -ef|grep -v grep |grep oracle (1 Reply)
Discussion started by: smazshah
1 Replies

2. AIX

HACMP: difference between 'cl' commands and 'cli' commands

Hi all, I'm new in this forum. I'm looking for the difference between the HACMP commands with the prefix "cl" and "cli". The first type are under /usr/es/sbin/cluster/sbin directory and the second are under /usr/es/sbin/cluster/cspoc directory. I know that the first are called HACMP for AIX... (0 Replies)
Discussion started by: peppix
0 Replies

3. Solaris

Performance difference between commands

Looking at the performance hit on my server, does it matter wich command I run? client # rsh server tar –cf - . | tar –cv –f – or server # tar –cf – . | rsh client ‘cd target && tar –xv -f –‘ I think it doesn't really matter because both command strings involve a tar being run on... (4 Replies)
Discussion started by: petervg
4 Replies

4. Shell Programming and Scripting

Difference between 2 grep - commands

Hi, I need to know the difference between this commands: grep * *search* grep "*" *search* As far as i know does the 2nd command search for files which have a name with *search* and greps then all which have chars from a-z in the file content. But was does the first command?? Best... (1 Reply)
Discussion started by: xus
1 Replies

5. UNIX for Dummies Questions & Answers

Check for difference in output of 2 commands?

Hello! I'm just learning the shell, and I would really like to know how to do this: Given these 2 commands: ls -l ls -le How can I, with a one-liner, ask the shell to show me visually in the shell, what the difference is between the output of the two commands? They look the same to me... (6 Replies)
Discussion started by: turbofayce
6 Replies

6. Shell Programming and Scripting

Difference between the commands

HI all, Please clarify the difference between the following pm2srv:/var/opt/temip/vf/scripts/saiki#awk '{RS = ":"} ; {print $0}' testf2 hey:wasup:howru: Yes I am fine pm2srv:/var/opt/temip/vf/scripts/saiki#awk 'BEGIN { RS = ":" } ; { print $0 }' testf2 hey wasup howru Yes I... (0 Replies)
Discussion started by: saiki
0 Replies

7. Shell Programming and Scripting

Difference between Maestro and Cron job

Hi, I have to setup a process which will run every 30 minutes and perform a task. I have been looking into and considered to put a cron job in place which will automatically execute the process. But lately I have found that Maestro job is also a process which will allow me to do the... (3 Replies)
Discussion started by: shanth_chandra
3 Replies

8. UNIX for Dummies Questions & Answers

Difference in commands

Hello All, I have a question about the difference between two commands. I am using Korn and was told by the Unix admin that 'nohup <command> &' equals 'nohup ./<command> &. That there is no difference betwewen the two. Is this true? Also, does the command './<command> &' provide a disconnect... (4 Replies)
Discussion started by: grin1dan
4 Replies

9. Solaris

difference between these commands??

Hi, I would like to know what is the difference between executing the mount command in the following ways... eg: /usr/sbin/mount -F <something> AND mount -F <something> I mean , just executing the mount command as opposed to specifying the path and then executing it? ... (3 Replies)
Discussion started by: wrapster
3 Replies

10. UNIX for Dummies Questions & Answers

what's the difference of these two commands?

shouldn't they give the same output? echo `echo \`date\`` is the same as the command date echo `echo date` prints the word date thanks! (3 Replies)
Discussion started by: kfad
3 Replies
Login or Register to Ask a Question