@依劍聽雨, centos7下用chkconfig會自動給轉成systemctl enable crond.service的
]]>改成 systemctl enable crond 就好了么
]]>@祈禱, shell是shell,crontab是crontab,不能用crontab的格式去寫shell,你自己網上查查shell怎么寫。
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
lynx --dump http://www.yourdomain.com/scripts/admin/cronjobs.php > /dev/null
lynx --dump http://www.yourdomain.com/scripts/cron.php > /dev/null
還得給shell文件加執行權限
@祈禱, 是
]]>@祈禱, 你這個的意思是每天的每個小時的第10分鐘運行一次。不是每十分鐘。
*/10 是每十分鐘
有時候直接寫可能會不行,可以寫一個shell文件,直接在crontab里寫上運行腳本文件