Cron file in cron.d isn't running at all, why?

0

I am unable to run my cron file stored at

/etc/cron.d

but it wouldn't run for unknown reasons :/ can someone please help?

Content of my cron file is as follows:

PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
MAILTO=""

# test
*/1 * * * * php echo "Hello World" > /tmp/backup-test2.log 2>&1

I am using CentOS if that can help

Troubleshooting I did

Service is running which is checked by running service crond status command

Ghazanfar Mir

Posted 2015-06-17T11:47:45.913

Reputation: 101

Answers

0

First I would check if the cron daemon is running (either using service or ps axf | grep cron to check it). Also I would use crontab -e to edit the crontab file, instead of accessing it directly in /etc/cron.d. A look in the syslog may also provide some insights in what is going wrong.

MaxP

Posted 2015-06-17T11:47:45.913

Reputation: 201