How to run a php file as a cron job in cPanel in B

2019-04-16 04:01发布

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.

2条回答
做自己的国王
2楼-- · 2019-04-16 04:23

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.

查看更多
贪生不怕死
3楼-- · 2019-04-16 04:31

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.

查看更多
登录 后发表回答