mac_gabe Posted May 27, 2011 Share Posted May 27, 2011 Hi, I'm looking for information on how to do a cron job or crontab. I.e. a web tutorial somewhere. I've never done one before so will need all the basics including where to put it on my host's server, how to check what's running on my web host etc, and of course what code to write. I'm planning to use it for a website to make a once-daily index of blog posts at an off-peak time (3 a.m.) The PHP script I'm going to run is a fairly simple preg replace on an xml page (which contains all the blog posts). The find and replace will find all the titles and links in the xml document and convert them into a long list of html links. I have written the PHP preg replace already, but I don't want to load it every time a visitor views a web page as the xml is a big file and it would bog down the website. I am at beginner level for most coding, though I'm OK at regex. Quote Link to comment https://forums.phpfreaks.com/topic/237616-cron-job-tutorial/ Share on other sites More sharing options...
mac_gabe Posted May 27, 2011 Author Share Posted May 27, 2011 OK - no worries, it seems my web host has an automated interface for doing this, and there's probably no directory I can access anyway. I'll just try doing it through their interface. Quote Link to comment https://forums.phpfreaks.com/topic/237616-cron-job-tutorial/#findComment-1221021 Share on other sites More sharing options...
HDFilmMaker2112 Posted May 29, 2011 Share Posted May 29, 2011 For some reason I can't start a new topic in this sub-forum.... so I'm going to have to hi-jack this thread. I'm trying to set-up a cron job to execute a php script. The Cron Job Command I have right now: /usr/bin/php -f /home/zyquo/public_html/ghosthuntersportal.com/cj_run.php Is that even remotely correct? As of right now it's not running at all. Quote Link to comment https://forums.phpfreaks.com/topic/237616-cron-job-tutorial/#findComment-1221900 Share on other sites More sharing options...
cssfreakie Posted May 29, 2011 Share Posted May 29, 2011 For some reason I can't start a new topic in this sub-forum.... so I'm going to have to hi-jack this thread. read the sticky! Quote Link to comment https://forums.phpfreaks.com/topic/237616-cron-job-tutorial/#findComment-1222047 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.