LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-14-2012, 06:10 AM   #1
ASTRAPI
Member
 
Registered: Feb 2007
Posts: 210

Rep: Reputation: 16
Question Centos 6 don't run my cron jobs


Hello

On my server Cento 6 64Bit the crontab was missing and i try to install it manually as i want to run 2 cron tasks but those tasks never run and i test it on Centos 5 and it is just fine ...

I think that something changed on the new Centos 6 related as i am reading on the net thay are using anacrontab and not crontab anymore...

But this software have some folders inside /etc/ like cron.daily cron.d cron.monthly cron.weekly and inside these folders are some files that seems to be each task each file...

This is what i did:

Code:
yum -y install crontabs cronie cronie-anacron
Then i edit it using:

Code:
nano anacrontab - e
then i add my two lines inside but never runs ...

I also add the lines to test on crontab file but as i am using Centos 6 i think is better to use the anacrontab.

Then after not working i try this:

Code:
/etc/init.d/crond restart
All OK !

Then this:
service crond status

And i got running with pid bla bla...

On cron logs i can see other things to run like disk alert and logrotate that are files that exist on /etc/cron.daily ....

But when i add my lines on anacrontab there are not any other entries there and the same also for crontab...

Also reading on the net i think i must configure also this settings that i do not know where they are:

Code:
SHELL=/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
# the maximal random delay added to the base delay of the jobs
RANDOM_DELAY=45
# the jobs will be started during the following hours only
START_HOURS_RANGE=20-22
 
#period in days   delay in minutes   job-identifier   command
1       5       cron.daily              nice run-parts /etc/cron.daily
7       25      cron.weekly             nice run-parts /etc/cron.weekly
@monthly 45     cron.monthly            nice run-parts /etc/cron.monthly
I want to run cronjobs always and not limit per hours per day as my cron jobs are running very ofthen like 15 minutes all day and night.

I do not need also delay...

cron tasks:

Code:
*/15 * * * * /usr/local/bin/indexer --config /usr/local/etc/sphinx_ipb.conf ipb_search_posts_delta ipb_search_topics --rotate
0 4 * * * /usr/local/bin/indexer --config /usr/local/etc/sphinx_ipb.conf --all --rotate
Any ideas on how to remove this and installing the normal crontab and start using it?

Last edited by ASTRAPI; 01-14-2012 at 06:35 AM.
 
Old 01-14-2012, 09:21 PM   #2
ASTRAPI
Member
 
Registered: Feb 2007
Posts: 210

Original Poster
Rep: Reputation: 16
Ok i decide to remove all related software to cron jobs and install simple crontab so i can edit the crontab file on /etc/ and that's it...

Any ideas how to do this?

Thank you
 
Old 01-15-2012, 02:42 AM   #3
ASTRAPI
Member
 
Registered: Feb 2007
Posts: 210

Original Poster
Rep: Reputation: 16
Problem solved !
 
  


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
[SOLVED] What happens to cron jobs scheduled to run when the PC is suspended? bonixavier Slackware 5 04-08-2011 12:52 AM
Is there a way to view what times cron jobs will run? MikeyCarter Linux - Software 6 01-17-2008 02:45 AM
cron hourly, daily, cron.d jobs don't execute eggsmartha Linux - General 3 09-17-2007 07:37 PM
How to run jobs in /etc/cron.daily? Micro420 Linux - Newbie 4 10-19-2006 03:07 PM
Cron jobs, will they run when not logged in? nextekcarl Linux - General 18 03-30-2004 11:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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