CRON jobs ---HELP!

This is a discussion on "CRON jobs ---HELP!" within the PHP Forum section. This forum, and the thread "CRON jobs ---HELP! are both part of the Program Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Jun 24th, 2007, 00:50
Up'n'Coming Member
Join Date: May 2007
Location: Tamworth
Age: 31
Posts: 95
Thanks: 0
Thanked 0 Times in 0 Posts
CRON jobs ---HELP!

I am getting very confused with creating a cron job, i have never done it before and i want to learn how to do it.

I have been told by my web host i need to run a php script to call CRON and make it grab the awstats text files.

For example the text file will look like this.

62007.cocoonfxmedia.co.uk.txt

If the directory

/folder1/folder2/awstats******.cocoonfxmedia.co.uk.txt

What would the script be to pull the lasted file?

any assistance will be wonderful.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Jun 24th, 2007, 07:27
Reputable Member
Join Date: Jul 2005
Location: Melksham, Wilts, UK
Posts: 293
Thanks: 0
Thanked 0 Times in 0 Posts
Re: CRON jobs ---HELP!

Jobs that run to a timed pattern (cron jobs) are usually set up using the crontab command which lets you edit them into a file in a particular format, then triggers a service (known as a damon on Unix and Linux systems) to oversee their running when necessary.

I've written more about crontab here where there is a longer description and some examples

Reading the information you have given, it looks like you need to run a cp or mv command to copy or move your log file to a known location ... the details of which would depend, as you have indicated, on the locations / names of the files concerned.

It's much easier (I find), by the way, to use complete absolute path names in all commands within your crontab file than to work out your current directory and then go relative.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
cron

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
jobs jobs jobs jobs!!! recruiterz Job Opportunities 0 Aug 2nd, 2006 08:55
Cron jobs? djme Databases 4 Mar 31st, 2006 19:46


All times are GMT. The time now is 17:48.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42