Jump to content

cron job tutorial


mac_gabe

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

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.