Cron-Datei in cron.d läuft überhaupt nicht, warum?

434
Ghazanfar Mir

Ich kann meine Cron-Datei nicht ausführen, die unter gespeichert ist

/etc/cron.d

aber es würde nicht aus unbekannten Gründen laufen: / kann jemand bitte helfen?

Der Inhalt meiner Cron-Datei lautet wie folgt:

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 

Ich benutze CentOS, wenn das helfen kann

Fehlerbehebung habe ich gemacht

Dienst läuft, der durch Ausführen des service crond statusBefehls überprüft wird

0

1 Antwort auf die Frage

0
MaxP

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.