hi

i used to be able to run cron from the browser

(http://www.domain.org/subdir/cron.php)

but couldn't figure out how to get it set up in CPanel's crontab. Now I can do that (using GET or curl, either one) but I get the following error no matter how I run it (browser or crontab):

Parse error: parse error, unexpected '>' in /home/username/public_html/subdir/cron.php on line 33

I don't get it... cron.php is empty (as far as I can see) so how do I figure out which line 33 is involved? (presumably the installation of some new module caused this but I don't see how)...

Can anyone point me in the right direction?

Thanks

Comments

scrypter’s picture

and it probably isn't as there must be something on line 33 to get the error. My 4.7 cron.php has 31 lines so maybe you have editied it and got some junk on the end of the file. Edit it again and backspace over any extra lines/crap and make sure there is just a CR after line 31 ('Cron run completed').

www.scryptik.com - Javascript editor with syntax error checking

www.purpleoar.co.nz/scryptik - Javascript editor with syntax error checking
www.purpleoar.co.nz - Web development, Drupal consultancy

Rasputin Paracelsus’s picture

do i feel stupid now...

i swear yesterday the file was empty (or maybe just looked it? i was getting frustrated as i had to do this on 34kbps dial-up and cpanel kept doing dumb things... can't keep up with slow speeds, i guess)

now i see a closing '>' at the end of the file which presumably wasn't there yesterday (co-webmaster sent me an email which i couldn't understand until now--i guess he added that, and i couldn't get in touch with him yesterday)

took it out, runs fine as a browser command... will try the cron again now.

sorry for the bother...

perhaps a bit of advice, though... how often do you recommend it be run? once a night? more frequently?

(we're not a high-traffic site. private registered users only numbering a dozen...)

thanks!

scrypter’s picture

Its not just about traffic, also how aften you change content. Cron builds the search index amongst other things. I reckon once a day would suit you.

www.scryptik.com - Javascript editor with syntax error checking

www.purpleoar.co.nz/scryptik - Javascript editor with syntax error checking
www.purpleoar.co.nz - Web development, Drupal consultancy

Rasputin Paracelsus’s picture

yes indeed, i realize that. at the moment, not too many posts...

thanks for the advice, appreciated.