Current location: Hot Scripts Forums » Programming Languages » PHP » PHP & Cron


PHP & Cron

Reply
  #1 (permalink)  
Old 05-04-05, 03:19 AM
DA Master DA Master is offline
Wannabe Coder
 
Join Date: Jun 2003
Location: Yorkshire
Posts: 116
Thanks: 0
Thanked 0 Times in 0 Posts
PHP & Cron

I have set up a cron job to delete users that are not validated 10 days after they have registered.

However when the cron deamon returns the email results it brings out loads of error messages. I have now found out that it doesn't execute the PHP file.

So my question is... How can I execute a PHP file for use in a cron job?


Thanks in advance.
__________________
PHP Code:

<?php if(PHP_OS == 'Windows') { echo "Doh"; } ?>

Reply With Quote
  #2 (permalink)  
Old 05-04-05, 11:20 AM
FiRe FiRe is offline
Code Guru
 
Join Date: Oct 2004
Location: UK
Posts: 801
Thanks: 0
Thanked 0 Times in 0 Posts
if u use cpanel then u can set up cron jobs from within!
__________________
Alexa Share <-- Trade virtual shares in websites with this online game.

codR.us <-- Submit and vote for your favorite code snippets with codR.us.

XEWeb.net <-- The ultimate PHP resource network.
Reply With Quote
  #3 (permalink)  
Old 05-04-05, 12:49 PM
DA Master DA Master is offline
Wannabe Coder
 
Join Date: Jun 2003
Location: Yorkshire
Posts: 116
Thanks: 0
Thanked 0 Times in 0 Posts
I have done. But if i'm correct you can't just type the path to a file.
__________________
PHP Code:

<?php if(PHP_OS == 'Windows') { echo "Doh"; } ?>

Reply With Quote
  #4 (permalink)  
Old 05-04-05, 02:41 PM
dennispopel dennispopel is offline
Coding Addict
 
Join Date: Mar 2005
Posts: 263
Thanks: 0
Thanked 0 Times in 0 Posts
With the CLI version installed (mostly everywhere) you should specify:
php /full/path/to/script.php
__________________
onPHP5.com - PHP5: Articles, News, Tutorials, Interviews, Software and more
Reply With Quote
  #5 (permalink)  
Old 05-04-05, 02:48 PM
DA Master DA Master is offline
Wannabe Coder
 
Join Date: Jun 2003
Location: Yorkshire
Posts: 116
Thanks: 0
Thanked 0 Times in 0 Posts
Cool, i'll try and let you know cron output.
__________________
PHP Code:

<?php if(PHP_OS == 'Windows') { echo "Doh"; } ?>

Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP and MySQL ? rob2132 Hot Scripts Forum Questions, Suggestions and Feedback 4 08-29-08 02:22 AM
2 profitable script sites for sale cms-master.com General Advertisements 3 07-03-07 10:17 AM
PHP Downside--Solutions? Amulet PHP 10 07-15-05 08:26 AM
Mouseover with Single PHP page rjwebgraphix PHP 7 09-16-04 05:15 PM
100 Web Templates & 10 PHP Scripts for sale! HostersUK.co.uk General Advertisements 0 01-10-04 12:31 AM


All times are GMT -5. The time now is 06:43 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.