Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We've just moved servers, from FreeBSD to CentOS. We have around 30 cron jobs which run throughout the day.

Since moving, it seems that some cron jobs are starting but not completing. We can see they kicked off but it's like they have timed out.

No errors in the phperror.log. Cron log shows the tasks starting. Also, we don't get emailed the output of the cronjobs - even though we have MAILTO=ben@domain.com at the top

These are PHP files, run using /usr/bin/php /path/to/file.php

I presume this is down to a mis config on the new server, but what could it be?

share|improve this question
4  
Also, it could be missing some required PHP package. I think it is a good idea to modify your script to include debug messages which should be saved in a log file. Also, did you try to run these scripts manually from the shell? –  Khaled Jan 21 '12 at 8:58
    
I could be anything. What have you checked so far? Are the cron-jobs still running as process? If not this is no cron issue. Have sent test-mails with mailx? Is your mailq empty? If yes - this is no mail issue. So it is propably PHP that is misbaving - debug it. –  Nils Jan 21 '12 at 21:38
    
They work fine from shell. I haven't tried mailx - will give that a go and see if it sends correctly, that will help with debugging. –  Ben Jan 22 '12 at 20:34

1 Answer 1

Fixed this. IT seems that Postfix wasn't installed correctly. Due to this the Crons were stalling for some reason (perhaps when they tried to access mail) and also logs not being generated.

After reinstalling Postfix, everything works

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.