LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   cronjob (https://www.linuxquestions.org/questions/linux-general-1/cronjob-803862/)

dnaqvi 04-23-2010 06:28 PM

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

AlucardZero 04-23-2010 06:47 PM

http://www.google.com/search?&q=cron

dnaqvi 04-23-2010 10:52 PM

Quote:

Originally Posted by AlucardZero (Post 3945831)

Are they correct?

for 11.00 pm
00 23 * * 1-5

and for 11.05 pm
05 23 * * 1-5

cola 04-23-2010 11:08 PM

Quote:

Originally Posted by dnaqvi (Post 3945987)
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?

rhadmn 04-26-2010 01:52 AM

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

TB0ne 04-26-2010 04:05 AM

Quote:

Originally Posted by dnaqvi (Post 3945987)
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??


All times are GMT -5. The time now is 02:51 PM.