How to run a php file as a cron job in cPanel in Bigrock Shared Hosting service?

限于喜欢 提交于 2019-12-06 11:45:57

问题


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

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

The control panel is cPanel Pro 1.0 (RC1)

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.

Thanks is advance.


回答1:


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

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.




回答2:


You can check manual provided by your hosting provider Bigrock

Below are the link for Cron job at big rock hosting

Also you can refer detail documentation define at in the same page

Please let me know if i can help you more.



来源:https://stackoverflow.com/questions/16880329/how-to-run-a-php-file-as-a-cron-job-in-cpanel-in-bigrock-shared-hosting-service

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!