We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

more cron jobs questions | Forum

bob
bob Nov 13 '11
I have followed the directions given in the Documentation section on cron jobs setup and I think I have it set up right however there is one instruction I don't understand... it is
"

Don't exit SSH if you want to check whether Cron has been set up correctly. Here is how you can do that:

Copy your command (for example, /usr/local/bin/php /home/yoursite/public_html/run.php) and paste it. Click Enter.

If there are no errors - the following line appears:

[root@server cron]#"

when I enter the command (/home/xxxxxxxx/www/my_site/ow_cron/run.php) I get this:



/home/xxxxxxxx/www/my_site/ow_cron/run.php: line 1: ?php: No such file or directory
/home/xxxxxxxx/www/my_site/ow_cron/run.php: line 3: /aquota.user: Permission denied
/home/xxxxxxxx/www/my_site/ow_cron/run.php: line 4: cgi-bin: command not found
/home/xxxxxxxx/www/my_site/ow_cron/run.php: line 5: syntax error near unexpected token `('
/home/xxxxxxxx/www/my_site/ow_cron/run.php: line 5: ` * The contents of this file are subject to the Common Public Attribution License Version 1.0 (the âLicenseâ


Does this mean there is something wrong with my run.php file?
I have chedked the beginning of the file and with no white spaces it begins with <?php

Also the permissions were 644 and I changed it to 755
Any help will be appreciated, Bob
The Forum post is edited by bob Nov 13 '11
Keelan Leader
Keelan Nov 13 '11
is /usr/local/bin/php the correct path for your host? Mine is just /usr/bin/php
bob
bob Nov 13 '11
yes my crontab line was:
*****/usr/local/bin/php /home/xxxxxxxx/www/mysite/ow_cron/run.php  I found this out from following the instructions supplied in the documentations.
Also I tried
*****/usr/local/bin/php -q /home/xxxxxxxx/www/mysite/ow_cron/run.php
*****/usr/local/bin/php -f /home/xxxxxxxx/www/mysite/ow_cron/run.php
Also I checked and my host supports cron jobs.  I entered a support ticket on this but did not get a response from them.

And Keelan, thank you for your response.
The Forum post is edited by bob Nov 13 '11
Keelan Leader
Keelan Nov 14 '11
The one in the documentation is just a guide, host can be different. Ask your host what the correct route is and report back.
bob
bob Nov 14 '11
Well, Keelan, using my SSH in my /ow_cron directory I ran "which php" and it came back with /usr/local/bin/php and I know my path to ow_cron is as stated above.
I would ask my host but they aren't being very nice.  My site just got hacked and everything was damaged.  I had to clear out my whole account and start rebuilding from scratch.  I got very little support and a big attitude.  I am very close to changing hosts.
Thank you for hanging in there with my issue, Bob
The Forum post is edited by bob Nov 14 '11
Den Team
Den Nov 14 '11
Topic was moved from General Questions.
Michael I.
Michael I. Nov 15 '11
Hi Bob, as I can see, you ran Cron command like this:
Quote from bob 

when I enter the command (/home/xxxxxxxx/www/my_site/ow_cron/run.php) I get this:

Well, did you try running it as full Cron path? I mean like the following (exclude * * * * * from the full path):

/usr/local/bin/php -f /home/xxxxxxxx/www/my_site/ow_cron/run.php

If so, did you receive the same errors you received when you tried to set up Cron originally? If yes, you surely should contact your hosting company support and ask them to check into this issue
bob
bob Nov 15 '11
Thanks for working with me on this, le_Mulder.  I tried the full path as you suggested and I don't get an error.
What does that tell you?
Michael I.
Michael I. Nov 16 '11
Most probably, that means Cron jobs work properly on your server. Do you have any issues related to Cron at the moment?
bob
bob Nov 16 '11
Yes, no mail is working... mass emails, invitations, etc.  My site is crippled without emails working.  I have entered a support ticket twice but am not getting any help from my host.
The Forum post is edited by bob Nov 16 '11
Michael I.
Michael I. Nov 17 '11
Well, you should find the way to get your support from hosting company since this doesn't seem to be an Oxwall issue.
Den Team
Den Nov 21 '11
Topic was moved from Bug reports and troubleshooting.