Question about cron output error


#1

I’m having an issue with my cron jobs. I just enabled them a few days ago, but they were working. I was getting ‘OK’ output.

Now, it’s like the cron is trying to run, but then the output I get is this:

It’s like it finds it then it doesn’t find it? Can someone help me decipher this?

Also, I’m wondering how I am going to execute these files by hand if I have to, since I can’t do it with a browser (no permissions for ‘others’). I’m using winscp, but having a hard time getting them to execute.


#2

What does your cron entry look like? It looks like you’re trying a browser command, but you say that you can’t do it with a browser due to no permission.

Your cron entry should look something like:
/usr/local/bin/php /home/MYUSER/PATH/file.php
(or /usr/local/php5/bin/php)

-Scott


#3

wget http://site.com/path/file.php

Like I said, this was working fine before. I did try an entry somewhat similar to what you’re suggesting when I was first experimenting but I could only get it to work with wget. Maybe this is a probably with permissions I’ve recently changed? I guess I’m not totally clear on what wget is doing. In any case, I eventually need the permissions to limit access from others.


#4

If you’re doing a wget, it’s on the webserver, and you can’t limit permissions, however, you can restrict web access with a .htaccess file. You can allow from its own IP address, and deny all else. Something like:

order deny,allow deny from all allow from 168.192.10.50
If you have changed permissions to restrict access, you’ve got to change them back.

-Scott


#5

Make sure that you have MAILTO='' as the first line in your crontab, that is kindof new.
Otherwise dump wget for curl.

or if you need to use bins then:

More php binaries you can use-

[code][4.4.8]
/usr/local/bin/php
/usr/local/dh/cgi-system/php.cgi

[5.2.3]
/usr/local/php5/bin/php
/usr/local/php5/bin/php-cgi[/code]

-c lets you specify a php.ini file path
-n tells the binary not to load the config file

Using that you can execute a script chmodded to 400.

_____
[color=#00CC00] _ _| _ _ _ _|_ _ (_|_\|<(_||_)(_|(_| |(/_ | [/color]
:~