不工作cron的任務。不工作cron任務
crontab -l
1 0 * * * php /home/bitrix/ext_www/art-code.su/cron/script.php
路徑php /home/bitrix/ext_www/art-code.su/cron/script.php
- 工作腳本。返回 - 1
它爲什麼不起作用?
腳本代碼:
echo mail("[email protected]", "My Subject", "Line 1\nLine 2\nLine 3".time()." end");
OS - centos6
克龍 - 工作
[[email protected] ~]$ systemctl status crond.service -l
crond.service - Command Scheduler Loaded: loaded (/usr/lib/systemd/system/crond.service; enabled; vendor preset: enabled) Active: active (running) since Wed 2017-10-11 16:19:51 EET; 1min 34s ago Main PID: 543 (crond) CGroup: /system.slice/crond.service └─543 /usr/sbin/crond -n
Oct 11 16:19:51 localhost.localdomain systemd[1]: Started Command Scheduler. Oct 11 16:19:51 localhost.localdomain systemd[1]: Starting Command Scheduler... Oct 11 16:19:52 localhost.localdomain crond[543]: (CRON) INFO (RANDOM_DELAY will be scaled with factor 45% if used.) Oct 11 16:19:52 localhost.localdomain crond[543]: (CRON) INFO (running with inotify support)
照你問。但仍然不起作用。 – RedSpace
你檢查了你的php可執行文件目錄嗎?或者你沒有檢查它而使用我的? –
我查過了。我在php /home/bitrix/ext_www/art-code.su/cron/script.php中找到/ usr/bin/php /usr/bin/php - 在控制檯中工作 – RedSpace