Jump to content


Photo

Cron jobs


  • Please log in to reply
7 replies to this topic

#1 Yesideez

Yesideez
  • Members
  • PipPipPip
  • Advanced Member
  • 2,334 posts
  • LocationDevon, UK

Posted 19 August 2006 - 07:38 PM

I've done a phpinfo() to get the full server path and have set up a cron job to execute every minute of every hour to send me an email.

Its been running for about 20 minutes so far and nothign has come through - this is what I've entered as the command line:
/usr/bin/php /home/randgigs/public_html/relocate.php > /dev/null 2>&1

Any idea what is wrong? I know the script works as I typed it into IE and the email came through straight away!
Not a pro just an enthusiast :)

if (empty($coffee)) {$coffee=new coffee();}

Please surround any code using the CODE tags - I rarely look at anything without them

#2 Yesideez

Yesideez
  • Members
  • PipPipPip
  • Advanced Member
  • 2,334 posts
  • LocationDevon, UK

Posted 19 August 2006 - 09:12 PM

Anyone?
Not a pro just an enthusiast :)

if (empty($coffee)) {$coffee=new coffee();}

Please surround any code using the CODE tags - I rarely look at anything without them

#3 hitman6003

hitman6003
  • Members
  • PipPipPip
  • Advanced Member
  • 1,807 posts

Posted 20 August 2006 - 12:43 AM

Try executing your cron line from the command line, manually, but without directing output to /dev/null so you can see any errors.

#4 Yesideez

Yesideez
  • Members
  • PipPipPip
  • Advanced Member
  • 2,334 posts
  • LocationDevon, UK

Posted 20 August 2006 - 12:50 AM

I don't know what you mean by the commend line as I'm using cPanel.

Ive removed the redirection and will see what happens next...
Not a pro just an enthusiast :)

if (empty($coffee)) {$coffee=new coffee();}

Please surround any code using the CODE tags - I rarely look at anything without them

#5 Yesideez

Yesideez
  • Members
  • PipPipPip
  • Advanced Member
  • 2,334 posts
  • LocationDevon, UK

Posted 20 August 2006 - 12:54 AM

woohoo my first email - I'm using the incorrect syntax by the looks of it. I'll keep editing the line and see what happens.
Not a pro just an enthusiast :)

if (empty($coffee)) {$coffee=new coffee();}

Please surround any code using the CODE tags - I rarely look at anything without them

#6 Yesideez

Yesideez
  • Members
  • PipPipPip
  • Advanced Member
  • 2,334 posts
  • LocationDevon, UK

Posted 20 August 2006 - 12:56 AM

I'm using this:
/usr/bin/php /home/randgigs/public_html/relocate.php
and I get this in an email:
Status: 404
X-Powered-By: PHP/4.4.1
Content-type: text/html

No input file specified.
How can it say that when I've specified it? I don't understand :S

I also tried adding -f before the filename and still the same message :S
Not a pro just an enthusiast :)

if (empty($coffee)) {$coffee=new coffee();}

Please surround any code using the CODE tags - I rarely look at anything without them

#7 Yesideez

Yesideez
  • Members
  • PipPipPip
  • Advanced Member
  • 2,334 posts
  • LocationDevon, UK

Posted 20 August 2006 - 01:32 AM

Just been reading this page:
http://www.phpfreaks...orials/28/0.php

I don't have anywhere to enter any information as I'm using cPanel so I can't really follow this tutorial - I'm extremely confused with this. Its telling me there's no file yet I know its there. I can run it via the browser and I get the email I'm expecting. The documentation for cPanel tells me nothing I don't know already and I've tried everything I can think of even specifying a direct link to the file instead of the full server path (which was obtained via phpinfo();)
Not a pro just an enthusiast :)

if (empty($coffee)) {$coffee=new coffee();}

Please surround any code using the CODE tags - I rarely look at anything without them

#8 Yesideez

Yesideez
  • Members
  • PipPipPip
  • Advanced Member
  • 2,334 posts
  • LocationDevon, UK

Posted 20 August 2006 - 02:10 AM

Found the problem - by checking FTP access via cPanel I can see that the server is actually trying to access a different area of the server, sort of like another account.

It should be /home/randgigs/public_html/ when its actually looking in /home/losthost/public_html/

I've contacted the web provider for an explanation and have requested they sort out the problem.
Not a pro just an enthusiast :)

if (empty($coffee)) {$coffee=new coffee();}

Please surround any code using the CODE tags - I rarely look at anything without them




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users