Query about alternative CRON method

Query about alternative CRON method

by brian avery -
Number of replies: 8
I just upgraded from 1.9.10+ to 2.0+ (I think - the latest version downloaded today). Having done so, I left the install alone for a while and did some other stuff. Hours later, I opened my email program and got the usual flurry of CRON notification emails. However, since upgrading, the messages have changed.
The emails received since the upgrade now all read:

"Web cron can not be executed as CLI script any more, please use admin/cli/cron.php instead"

I use the cronjob facility in Cpanel. Do I simply edit the filename (adding cli, in effect) or do I need to do anything else to get cron running again?

By the way, is it just me or is there something odd going on here? The text in this message isn't wrapping.

Thanks,
Brian
Average of ratings: -
In reply to brian avery

Re: Query about alternative CRON method

by Andrew Davis -

Simply altering the file name should do the trick smile

Not sure whats going on with your forum post. It looks different from others.

In reply to Andrew Davis

Re: Query about alternative CRON method

by brian avery -

Andrew,

Indeed, I changed the file name, taking a wild guess... however it opened another can of worms.

I changed the cronjob set up via cpanel to call admin/cli/cron.php instead, which was a partial success. The previous error message in the output emails went away but was replaced by another:

"!!! <p><strong>SECURITY WARNING!</strong></p><p> To operate properly, Moodle requires <br />that you make certain changes to your current PHP settings.</p><p>You <em>must</em> set <code>register_globals=off</code>.</p><p>This setting is controlled by editing your <code>php.ini</code>, Apache/IIS <br />configuration or <code>.htaccess</code> file.</p> !!!"

This is confusing because globals have been set to off since I installed moodle about 6 months ago. Reading php.ini, they are still off. I'm not sure what exact command is required in .htaccess but I'm assuming this was set up properly in the past otherwise I wouldn't have been able to upgrade to 1.9.10 or 2.0 in the first place. I think?

This, and another problem with being unable to register the site has been added to the general problems forum http://moodle.org/mod/forum/discuss.php?d=163717

However, if anyone here knows what it relates to I'd be grateful. There's something odd going on and I'm totally over my head when it comes to php and stuff like that!

Brian

In reply to brian avery

Re: Query about alternative CRON method

by brian avery -

Andrew,

Is there anything you can suggest about this? Changing the file name so it calls admin/cli/cron.php seems to have stopped cron and instead of sending me cron output by email I get the message about needing to set globals off...yet looking at the files and reading the 'environment' report in moodle it confirms that it's all okay - as I already knew.

I'm wondering if there was a problem with the install because it's also slower than my grandmother over hurdles. There seem to be several things which are't right, even if I have no idea what causes them.

Brian

In reply to brian avery

Re: Query about alternative CRON method

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Brian,

Re the formatting of your post, it looks as if you have selected "preformatted" from the "Paragraph" drop-down list in the HTML editor menu.

Joseph

The following text is "preformatted" format:

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi pede ipsum, interdum ac, tempus vitae, mollis at, ante. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. 
Morbi justo. Cras sit amet nisl. Suspendisse potenti. Nam egestas nisi vel libero. Nulla facilisi. Duis fermentum orci tincidunt quam. Vivamus et leo. 
Donec hendrerit, erat ut gravida pharetra, quam augue pharetra risus, in laoreet enim elit non ante. Nunc ut diam. Curabitur sapien nunc, scelerisque a, sagittis ac, tempor ac, nisl. 
In reply to Joseph Rézeau

Re: Query about alternative CRON method

by brian avery -

Thank you Joseph.

I didn't select anything intentionally, but perhaps my mouse tripped over it somehow!

Brian

In reply to brian avery

Re: Query about alternative CRON method

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Brian "perhaps my mouse tripped over it somehow!"

Yes, computer mice (mouses?) do like to trip by themselves at times.big grin

In reply to Joseph Rézeau

Re: Query about alternative CRON method

by brian avery -

Joseph,

I changed the filename for the cronjob, but today, roughly 24 hours after upgrading, I got the 'cron has not run for 24 hours' message. Copied word for word, the command I'm using - or trying to use - is :

php -q /home/bca19560/public_html/insegnanti-inglese.com/moodle/admin/cli/cron.php

With the exception of the /cli/ addition, the command worked perfectly until yesterday, with 1.9.10+   Obviously, simply changing the filename doesn't do the trick. Any suggestions? I can't find anything written anywhere about this (the change forced by upgrading to 2.0).

Brian

In reply to brian avery

Re: Query about alternative CRON method

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Sorry, can't help in this matter, Andrew is the knowledgeable person here.