简体   繁体   English

cron作业命令

[英]cron job command

i set my php file in cron jobs with command /home/findia/public_html/ifs/ifs-admin/reminder_mail.php. 我使用命令/home/findia/public_html/ifs/ifs-admin/reminder_mail.php在cron作业中设置了我的php文件。

 But i am getting mail by cron jobs it contains,

/bin/sh: /home/findia/public_html/ifs/ifs-admin/reminder_mail.php: Permission denied / bin / sh:/home/findia/public_html/ifs/ifs-admin/reminder_mail.php:权限被拒绝

Inside your cron tab put this command instead: 在您的cron选项卡中放入以下命令:

/usr/bin/php -q /home/findia/public_html/ifs/ifs-admin/reminder_mail.php

Assuming your php binary is in /usr/bin ; 假设您的php二进制文件位于/usr/bin change it accordingly, if needed. 如果需要,请相应地进行更改。

我在crontab文件中将此行/usr/bin/curl http://YOURDOMAIN/whmcs/crons/cron.php (将YOURDOMAIN更改为正确的域或IP地址)放置在该行中

您需要确保为执行cron作业的用户正确设置了文件权限。

php CLI scripts need to be run with /usr/bin/php php CLI脚本需要与/ usr / bin / php运行

so for example, your "cron" entry would be (assuming php exists in /usr/bin).. 因此,例如,您的“ cron”条目为(假设php在/ usr / bin中存在)。

[insert frequency of execution here>] /usr/bin/php /home/findia/public_html/ifs/ifs-admin/reminder_mail.php [在此处插入执行频率>] /usr/bin/php /home/findia/public_html/ifs/ifs-admin/reminder_mail.php

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM