Jump to content

Cron jobs


Yesideez

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!
Link to comment
https://forums.phpfreaks.com/topic/18047-cron-jobs/
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
Link to comment
https://forums.phpfreaks.com/topic/18047-cron-jobs/#findComment-77429
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();)
Link to comment
https://forums.phpfreaks.com/topic/18047-cron-jobs/#findComment-77446
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.
Link to comment
https://forums.phpfreaks.com/topic/18047-cron-jobs/#findComment-77452
Share on other sites

Archived

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

×
×
  • Create New...

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.