Author Topic: cron job without cpanel?  (Read 11092 times)

Offline feeble

Re: cron job without cpanel?
« Reply #15 on: May 09, 2007, 08:06:31 am »
Yeah...I dont know why it doesnt work. I put in a support ticket to my host. Maybe I should just call em up...

maybe this one might work instead
* * * * * /dh/cgi-system/php.cgi /home/youruser/yourdomain.com/path-to-php4-script.php

Quote from: p-chan
Hihi..i followed the instructions given, but it doesn't seem to work cos there's no increase in the money put in the bank.. =(

this is for dreamhost users only.
http://www.daniel15.com/forum/index.php/topic,193.0.html
for how to setup the cron on other hosts

Offline p-chan

Re: cron job without cpanel?
« Reply #16 on: May 09, 2007, 11:40:11 am »
Could it be that the code is wrong? Cos it seems a little different from the code provided by Daniel =)

Offline ProwlingTiger

Re: cron job without cpanel?
« Reply #17 on: May 09, 2007, 11:55:47 am »
I contacted DreamHost. They told me something about not being able to run PHP scripts in that manner...or something.

Here's the script they gave me to try:
Code: [Select]
lynx -dump http://zephyrgaming.com/forums/Sources/shop/dointerest.php

Offline p-chan

Re: cron job without cpanel?
« Reply #18 on: May 09, 2007, 12:03:15 pm »
Thanks a lot! I shall try the code too =)

Offline ProwlingTiger

Re: cron job without cpanel?
« Reply #19 on: May 10, 2007, 03:31:54 am »
I didnt get it to work. You?

Offline p-chan

Re: cron job without cpanel?
« Reply #20 on: May 11, 2007, 10:17:17 am »
I didnt get it to work. You?

Me too..it doesn't work.. T_____T

Offline ProwlingTiger

Re: cron job without cpanel?
« Reply #21 on: May 11, 2007, 11:00:29 am »
Well I was then told to add something like /user/bin...but that didnt work either.

Offline Daniel15

Re: cron job without cpanel?
« Reply #22 on: May 12, 2007, 12:34:39 pm »
I contacted DreamHost. They told me something about not being able to run PHP scripts in that manner...or something.

Here's the script they gave me to try:
Code: [Select]
lynx -dump http://zephyrgaming.com/forums/Sources/shop/dointerest.php
OK, If you need to run it like that, you need the script in the Bank interest without cron job? Read this! topic. Save that script with a random name (as detailed in that topic), test it out (by going to http://zephyrgaming.com/forums/whatever_it_is_called.php), and once it's confirmed as working, use the URL to it in the cron job.

Offline ProwlingTiger

Re: cron job without cpanel?
« Reply #23 on: May 12, 2007, 01:37:03 pm »
Okay, I shall see if it works!

Offline ProwlingTiger

Re: cron job without cpanel?
« Reply #24 on: May 13, 2007, 02:27:46 pm »
Okay, Im about ready to just give this interest thing up.

Heres my cron job:
Code: [Select]
/usr/bin/lynx -dump=20
http://www/forums/filename.php

And the file code:
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/.***/www/forums/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");
?>