Welcome Guest, Not a member yet? Register   Sign In
Cron not working
#1

[eluser]webnology[/eluser]
Hi all,

I have a script that needs to be run every 5 minutes. If I execute it via the url it works fine, but via cron it doesn't seem to work.

This is the cron
Code:
*/5 * * * * php -q /var/www/html/index.php customers sendBirthdays

Any ideas what else could go wrong?

All help appreciated,
Michel
#2

[eluser]danmontgomery[/eluser]
Code:
* * * * * /path/to/php /path/to/script

most likely /usr/bin/php, depending on your installation.
#3

[eluser]appleboy[/eluser]
Please use absolute PHP script path.

find php command:
Code:
# which php
#4

[eluser]appleboy[/eluser]
Please use absolute PHP script path.

find php command:
Code:
# which php
#5

[eluser]farhad zand[/eluser]
Code:
/usr/bin/curl -s http://yoursite.com/index.php/home/index
#6

[eluser]webnology[/eluser]
ok, it seems that he cron is executed every 5 minutes, as it should, but the mail is not being sent. If I execute it via the url, then my mail gets sent perfectly. Could it be that the cron job execution does not work properly with accessing a mailserver?

M
#7

[eluser]appleboy[/eluser]
you can try command first, it will display message?
#8

[eluser]farhad zand[/eluser]
no cron no limit for that you must maches your script With your caling address in cron job
#9

[eluser]webnology[/eluser]
I now have this in the cron:

*/5 * * * * /usr/bin/php -q /var/www/html/index.php customers sendBirthdays

It is executed every 5 minutes, but no mails arrive, which is what he qcript should do.

The script works, because if I enter it as a URL, mails arrive.

Please help...

M
#10

[eluser]appleboy[/eluser]
Please check /var/log/maillog first, and execute the command "/usr/bin/php -q /var/www/html/index.php customers sendBirthdays".

Dose it work on command, except no mails arrive?




Theme © iAndrew 2016 - Forum software by © MyBB