如何在cPanel中运行php文件作为cron作业在Bigrock共享托管服务? [英] How to run a php file as a cron job in cPanel in Bigrock Shared Hosting service?

查看:202
本文介绍了如何在cPanel中运行php文件作为cron作业在Bigrock共享托管服务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图运行一个PHP文件,该文件会自动生成站点地图,并通过 cURL 作为cron作业ping各种搜索引擎。

I'm trying to run a PHP file that automatically generates a sitemap and pings various search engines via cURL as a cron Job.

托管计划是由 Bigrock.in 提供的共享计划 strong>。

By hosting plan is a shared plan provided by Bigrock.in.

控制面板 cPanel Pro 1.0(RC1)

这是我的当前cron命令:

This is my Current cron command :

php /home/myusername/public_html/sitemap_auto.php

但这似乎并不工作。所以任何帮助将非常感谢。

But this does not seem to work at all. So Any help would be greatly appreciated.

感谢是先进的。

推荐答案

是/ usr / bin / php,因此要设置的cron命令将是

The path to the php binary is - /usr/bin/php so the cron command to be set up will be

/ usr / bin / php /home/myusername/public_html/sitemap_auto.php

/usr/bin/php /home/myusername/public_html/sitemap_auto.php

但是,似乎更可能的原因是cron失败的是在别处。建议您向我们的支持小组提出请求,并让他们知道您如何生成站点地图,以及您用来ping搜索引擎的具体命令。

However, it seems more likely that the reason for the cron failing is elsewhere. I'd suggest that you raise a request with our support team and let them know how exactly you are generating the sitemap and which specific commands you are using to ping the search engines.

这篇关于如何在cPanel中运行php文件作为cron作业在Bigrock共享托管服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆