[英]How can i set a cron job in Zpanel
in C panel we can set url in cron job like 在C面板中,我们可以在cron作业中设置url,例如
wget example.com/homes/action wget example.com/homes/action
Or absolute path 或绝对路径
/usr/bin/php -q /home/mohanphp/www/quote_bot/sms_cron.php / usr / bin / php -q /home/mohanphp/www/quote_bot/sms_cron.php
but Zpanel dose not support full url 但Zpanel不支持完整网址
and i want to call an action (in Cakephp eg http://abc.com/homes/corn_job/daily/ ) 并且我想调用一个动作(在Cakephp中,例如http://abc.com/homes/corn_job/daily/ )
in c panel there is no problem but Zpenal how to do this ?? 在c面板中没有问题,但是Zpenal怎么做?
thanks 谢谢
You can better check the link set a cron job in Zpanel . 您可以在Zpanel中更好地检查链接设置cron作业 。
touch /etc/cron.d/zdaemon
echo "*/5 * * * * root /usr/bin/php -q /etc/zpanel/panel/bin/daemon.php >> /dev/null 2>&1" >> /etc/cron.d/zdaemon
chmod 644 /etc/cron.d/zdaemon
If you are trying to run the URL, just because you want to run an action of a cakephp controller. 如果您试图运行URL,则仅仅是因为您想运行cakephp控制器的操作。 Then you should try to use a dispatcher, which will let you execute a controller action from the command prompt and then you can setup the cron as normal in zpanel. 然后,您应该尝试使用调度程序,该调度程序可让您从命令提示符处执行控制器操作,然后可以在zpanel中正常设置cron。
More information about the cron dispatcher could be found here: http://colorblindprogramming.com/cronjobs-in-cakephp-2-in-5-steps 有关Cron调度程序的更多信息,请参见: http : //colorblindprogramming.com/cronjobs-in-cakephp-2-in-5-steps
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.