LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 12-11-2015, 10:42 PM   #1
charithsrng
LQ Newbie
 
Registered: Jan 2013
Posts: 26

Rep: Reputation: Disabled
Crontab entry


Hi,

Could you please explain the behavior of below crontab.
Is it running 4th of dec only or every week friday?

45 20 4 12 5 sh /db01/ora/stopdb_ora.sh >> /db01/ora/database_stop.log


Thanks,
Charith
 
Old 12-11-2015, 11:07 PM   #2
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: Redhat/Centos, Ubuntu, Raspbian, Fedora
Posts: 1,692

Rep: Reputation: 353Reputation: 353Reputation: 353Reputation: 353
Quote:
Originally Posted by charithsrng View Post
Hi,

Could you please explain the behavior of below crontab.
Is it running 4th of dec only or every week friday?

45 20 4 12 5 sh /db01/ora/stopdb_ora.sh >> /db01/ora/database_stop.log
That's explained in the man page (man 5 crontab):
Quote:
Note: The day of a command's execution can be specified by two fields - day of month, and day of week. If both fields are restricted (ie, aren't *), the command will be run when either field matches the current time. For example,
"30 4 1,15 * 5" would cause a command to be run at 4:30 am on the 1st and 15th of each month, plus every Friday.
In other words, it's a logical or operator: If the day is Friday or Dec 4 the program will run.
 
1 members found this post helpful.
Old 12-11-2015, 11:31 PM   #3
charithsrng
LQ Newbie
 
Registered: Jan 2013
Posts: 26

Original Poster
Rep: Reputation: Disabled
Thanks,
Got it.
 
  


Reply


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
crontab entry update wadam1972 Linux - General 2 02-09-2009 08:22 PM
about crontab entry Ravi kumar Linux - Software 2 09-16-2008 01:41 PM
Somehow not getting crontab entry right Jykke Linux - Desktop 4 02-29-2008 01:50 PM
crontab entry? Master Fox Linux - Software 4 08-23-2005 01:20 PM
crontab entry pilipk01 Linux - General 4 11-19-2003 07:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

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