Author Topic: [SOLVED] Cron job probs  (Read 10330 times)

Offline Daniel15

Re: [SOLVED] Cron job probs
« Reply #15 on: June 09, 2007, 10:36:52 am »
In that case, make sure you add the correct path to the end of it.  In your case, I think it'd be /home/.c**/***/www.minemine.org/Sources/shop/dointerest.php :)

Offline Earache

Re: [SOLVED] Cron job probs
« Reply #16 on: June 09, 2007, 02:11:11 pm »
Its not working for me.
Code: [Select]
<?php
/**********************************************\
| SMFSHOP (Shop MOD for Simple Machines Forum) |
|         (c) 2005 DanSoft Australia           |
|      http://www.dansoftaustralia.net/        |
\**********************************************/

//File: dointerest.php
//      The file to add interest to member's bank

//VERSION: 1.31 (Build 7)
//DATE: 10th December 2005

include("/home/.<server name>/<shell user name>/<domain name in the form of abc.com>/<directory for forum if not in root>/SSI.php");

$interest_rate $modSettings['shopInterest'] / 100;
db_query("UPDATE {$db_prefix}members
SET moneyBank = moneyBank + (moneyBank*
{$interest_rate})"__FILE____LINE__);

echo 
"Interest added at ".date("d/m/Y h:i:s A");
?>
This one just says
Quote
Warning: include(/home/.caracal/lucapit/minemine.org/Sources/shop/dointerest.php) [function.include]: failed to open stream: No such file or directory in /home/.caracal/lucapit/www.minemine.org/Sources/shop/dointerest.php on line 14

Warning: include() [function.include]: Failed opening '/home/.caracal/lucapit/minemine.org/Sources/shop/dointerest.php' for inclusion (include_path='.:/usr/local/php5/lib/php') in /home/.caracal/lucapit/www.minemine.org/Sources/shop/dointerest.php on line 14

Fatal error: Call to undefined function db_query() in /home/.caracal/lucapit/www.minemine.org/Sources/shop/dointerest.php on line 17

and the orignal one does absolutely nothing.
Any idea? :(

Offline Daniel15

Re: [SOLVED] Cron job probs
« Reply #17 on: June 10, 2007, 12:37:54 pm »
Quote
Warning: include(/home/.caracal/lucapit/minemine.org/Sources/shop/dointerest.php) [function.include]: failed to open stream: No such file or directory in /home/.caracal/lucapit/www.minemine.org/Sources/shop/dointerest.php on line 14

In the interest PHP file, change minemine.org to www.minemine.org :)
Edit: Just so I don't confuse you :P, the line in dointerest.php should look like:

include('/home/.caracal/lucapit/www.minemine.org/SSI.php');
« Last Edit: June 10, 2007, 12:40:02 pm by Daniel15 »

Offline Earache

Re: [SOLVED] Cron job probs
« Reply #18 on: June 11, 2007, 10:54:21 am »
yay it worked!!

Thanks Daniel, amazing script!!