Welcome to WebmasterWorld Guest from 18.207.136.184

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Cron Questions

     
5:04 pm on Nov 14, 2005 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:June 12, 2004
posts:789
votes: 0


Just a few questions about cron files:

Can I include other files? Eg

<?php
require(config.php);
....

That's pretty much it! I'm running a cron job from DirectAdmin and I keep getting an error email with:

/home/aliashos/domains/aliashosting.co.uk/private_html/inc/cron/subscriptioncheck.cron.php: line 1:?php: No such file or directory
/home/aliashos/domains/aliashosting.co.uk/private_html/inc/cron/subscriptioncheck.cron.php: line 2: //: is a directory
/home/aliashos/domains/aliashosting.co.uk/private_html/inc/cron/subscriptioncheck.cron.php: line 3: //: is a directory
/home/aliashos/domains/aliashosting.co.uk/private_html/inc/cron/subscriptioncheck.cron.php: line 4: //: is a directory
/home/aliashos/domains/aliashosting.co.uk/private_html/inc/cron/subscriptioncheck.cron.php: line 38: //: is a directory
/home/aliashos/domains/aliashosting.co.uk/private_html/inc/cron/subscriptioncheck.cron.php: line 39: syntax error near unexpected token `('
/home/aliashos/domains/aliashosting.co.uk/private_html/inc/cron/subscriptioncheck.cron.php: line 39: `$udq = mysql_query("SELECT * FROM $CustomersTable",$Link) or die(mysql_error());'

And if I run the file in my web browser, it works fine! Confused :S

10:48 pm on Nov 14, 2005 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 13, 2003
posts:775
votes: 0


Can I include other files? Eg

Yep

That's pretty much it! I'm running a cron job from DirectAdmin and I keep getting an error email

Strange. I don't know this admin panel. Have you tried asking in the DirectAdmin forums [directadmin.com]?

Tim

8:33 am on Nov 15, 2005 (gmt 0)

Senior Member

WebmasterWorld Senior Member dreamcatcher is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 30, 2003
posts:3719
votes: 0


Direct Admin is a great Control Panel, very user friendly. I have a similar problem with C Panel in that I get an e-mail with gibberish in. However, the cron still runs ok.

Might be a Direct Admin bug.

dc

9:03 am on Nov 15, 2005 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:June 12, 2004
posts:789
votes: 0


It's really strange. I tested the file on my machine (Mac with XAMPP) and it worked fine! But i'll try my luck with the DA forums! Thanks!
6:43 pm on Nov 15, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Oct 15, 2005
posts:79
votes: 0


I had a very similar problem. My host explained that when windows runs the cron script it isn't run through the web server so it doesn't understand the php. Adding this chunk to the beginning of the actual cron command:

php -q /home/...

and this to the php script page:

#!/usr/local/bin/php -q

took care of the problem. Not sure if this is the same for all servers but it's worth a shot.

William.

11:25 am on Nov 16, 2005 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:June 12, 2004
posts:789
votes: 0


Hmmm nice idea, although my server is on linux, i'll try it out and contact my hosts about it (don't know why i didn't think of contacting them!)
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members