Jump to content
xisto Community
Sign in to follow this  
dhi

Cron Job

Recommended Posts

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.