dhi 0 Report post Posted December 19, 2011 hello phpgeeks, I have created a php file which i want to run in the background even if my site is not used by any1. How to add this file in cron job using c-panel of linux hosting. Share this post Link to post Share on other sites
Quatrux 4 Report post Posted December 28, 2011 Go to CPanel of your hosting and in the menu Advanced you can see a section called Cron jobs, push on it.Set when you want it to work, the period of time, by common settings you will understand how it works. The command run by the cron job must be a valid command.So here are some methods which could work:wget -O /dev/null http://forums.xisto.com/no_longer_exists/ >/dev/nullGET http://forums.xisto.com/no_longer_exists/ > /dev/nullor just put the document root path to file and it should work as you may not have the permissions to run some commands:/home/YOURUSER/public_html/cron.php Share this post Link to post Share on other sites