Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

/etc/cron.d Not working under debian

I can't seem to get anything inside of the cron.d folder working. I need to be able to drop cron files inside or as least just get one file working that I can edit. Currently the folder has a "php5" file that already works but my other files wont run. I made the file the same permissions as the "php5" file (644 root:root)

This is my current cron file under /etc/cron.d/mycron

* * * * *   root    /usr/bin/php /var/www/private/cron/checkstatus.php

Is there some kind of magicaly hidden file I need to my cron file to?

Running debian 7.5.0 minimal server install.

like image 862
ldrrp Avatar asked Jun 28 '14 23:06

ldrrp


1 Answers

Thank you Stephen, it was simpler than I though. I checked the logs

tail -f /var/log/syslog | grep cron -i

And I found this

ERROR (Missing newline before EOF, this crontab file will be ignored)

Adding a newline to the end of my crontab files fixed the problem. On top of that I had a return carriage character from Windows that was causing bash to choke.

like image 79
ldrrp Avatar answered Sep 21 '22 19:09

ldrrp