LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 04-23-2010, 07:28 PM   #1
dnaqvi
Member
 
Registered: Oct 2009
Posts: 116

Rep: Reputation: 15
cronjob


Hello,

OS: Linux

I need to run the files everyday at 11.00 pm (Monday to Friday).

How would I put on cronjob?
I have files ready.

thanks
 
Old 04-23-2010, 07:47 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,652

Rep: Reputation: 536Reputation: 536Reputation: 536Reputation: 536Reputation: 536Reputation: 536
http://www.google.com/search?&q=cron
 
Old 04-23-2010, 11:52 PM   #3
dnaqvi
Member
 
Registered: Oct 2009
Posts: 116

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by AlucardZero View Post
Are they correct?

for 11.00 pm
00 23 * * 1-5

and for 11.05 pm
05 23 * * 1-5
 
Old 04-24-2010, 12:08 AM   #4
cola
Senior Member
 
Registered: Sep 2007
Location: Dhaka,Bangladesh
Distribution: Debian
Posts: 1,019

Rep: Reputation: 63
Quote:
Originally Posted by dnaqvi View Post
Are they correct?

for 11.00 pm
00 23 * * 1-5

and for 11.05 pm
05 23 * * 1-5
https://help.ubuntu.com/community/CronHowto
Which linux distribution are you on?
 
Old 04-26-2010, 02:52 AM   #5
rhadmn
Member
 
Registered: Oct 2009
Location: Bangalore
Distribution: Redhat Linux, Solaris, CentOS
Posts: 32

Rep: Reputation: 1
Yes that is correct.

Basically The Crontab has 6 fields including the job/command you want to execute.


1 - Minute [0-60]
2 - Hours [0-23]
3 - Day Of Month [1-31]
4 - Month [1-12]
5 - Day Of Week [0-6 - where 0 is for Sunday].

Hence for your requirement ie "I need to run the files everyday at 11.00 pm (Monday to Friday)" the crontab entry would be something like below :-

00 23 * * 1-5 <job/command you want to run>


Note :- Crond is the daemon for cronjobs which checks the Crontab file every 2 mins for any changes/updation etc.

Regards,
RHADMN
 
Old 04-26-2010, 05:05 AM   #6
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 15,102

Rep: Reputation: 2719Reputation: 2719Reputation: 2719Reputation: 2719Reputation: 2719Reputation: 2719Reputation: 2719Reputation: 2719Reputation: 2719Reputation: 2719Reputation: 2719
Quote:
Originally Posted by dnaqvi View Post
Are they correct?

for 11.00 pm
00 23 * * 1-5

and for 11.05 pm
05 23 * * 1-5
Well, what happened when you TRIED it? Were ALL of the how-to docs on CRON impossible to understand??
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
cronjob help meeh Linux - General 1 03-26-2004 12:41 PM
Cronjob engnet Linux - Networking 6 03-03-2004 10:21 AM
cronjob ugob Linux - Software 0 03-03-2004 10:20 AM
Su in a cronjob michedlp Programming 3 11-06-2003 09:30 AM
cronjob FastEddy Linux - General 1 04-12-2003 10:52 PM


All times are GMT -5. The time now is 01:06 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration