Jump to content

Archived

This topic is now archived and is closed to further replies.

Yesideez

Cron jobs

Recommended Posts

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:
[code]/usr/bin/php /home/randgigs/public_html/relocate.php > /dev/null 2>&1[/code]

Any idea what is wrong? I know the script works as I typed it into IE and the email came through straight away!

Share this post


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

Share this post


Link to post
Share on other sites
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...

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
I'm using this:
[code]/usr/bin/php /home/randgigs/public_html/relocate.php[/code]
and I get this in an email:
[code]Status: 404
X-Powered-By: PHP/4.4.1
Content-type: text/html

No input file specified.[/code]
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

Share this post


Link to post
Share on other sites
Just been reading this page:
http://www.phpfreaks.com/tutorials/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();)

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.