-1

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 [email protected] 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?

3
  • 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, 2012 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, 2012 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, 2012 at 20:34

1 Answer 1

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .