Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have installed crontab on CentOS 5.6 x64 via

yum install vixie-cron.x86_64

Here is my crontab -e

SHELL=/bin/sh
0       0       *       *       *       cat /root/mysql-backup.txt | xargs /root/mysql-cron.sh

Whenever I run this command manually it executes without problems:

cat /root/mysql-backup.txt | xargs /root/mysql-cron.sh

I am just wondering why my cron is not running. It's suppose to run every midnight to backup my mysql database.

Are there any other particular steps to configure cron with crontab?

share|improve this question
1  
Stupid question: have you checked that your crond (cron daemon) is running? –  Stéphane Gimenez Sep 28 '11 at 0:42
1  
Do you have a record of the cron job in your system logs? Do you have local mail configured, so that cron sends you mail if the command produces output? How do you know that the command was not executed in the first place? –  Gilles Sep 28 '11 at 0:48
    
@StéphaneGimenez omg .. tsk I am so stupid. Thanks! –  Aivan Monceller Sep 28 '11 at 2:55

1 Answer 1

This is a stupid question. But to answer this question Stéphane Gimenez told me to run crond. Here is how to do it for newbies out there like me.

/etc/init.d/crond start

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.