Please test new Windows Cron solution

Please test new Windows Cron solution

Martin Dougiamas -
Number of replies: 30
Core developers Նկարը Documentation writers Նկարը Moodle HQ Նկարը Particularly helpful Moodlers Նկարը Plugin developers Նկարը Testers Նկարը
Thanks to Peter Honan we have a new and better solution for cron on Windows!

Could testers on Windows please get rid of their old cron method and try this new package instead? It's very easy to install and runs as a proper Windows service.

Please let me know here how it goes (ASAP, really)

http://download.moodle.org/download.php/windows/MoodleCron-Setup.exe


(Edited by Helen Foster to update the link - original submission Tuesday, 31 August 2004, 07:38 AM)

Վարկանիշների միջին թիվը. -
In reply to Martin Dougiamas

Re: Please test new Windows Cron solution

Jan Dierckx -
The documentation says
"If you need to change a setting, uninstall it then reinstall it."
I made a typo in one of the settings (You did ask for a reply ASAP and I wanted to be quick ... alas, too quick big grin) and wanted to change it.
I ran uninstall.exe and then install.bat immediately afterwards. This caused an error message to pop up (translated roughly: this service was marked for deletion)
It seems one extra step is needed: hitting CTRL-ALT-DEL and then killing the Moodle Cron process.
After that, I could reinstall without a problem...
Maybe this extra step should be in the documentation...
In reply to Martin Dougiamas

Re: Please test new Windows Cron solution

Gustav W Delius -

The installation works and cron works. Just one little oddity: I gave cron two URL's but when I looked in the registry there were four, the default URL was there twice even though I had not chosen it at all.

I think how this happened is that I first had thought of registering more URLs, went to the dialogue where one enters them but then pressed "Cancel". Maybe the cancel button doesn't really cancel. I will investigate more.

In reply to Gustav W Delius

Re: Please test new Windows Cron solution

Gustav W Delius -
Yes, I can confirm this: everytime one clicks cancel on the URL dialogue another http://localhost/moodle/admin/cron.php is added to the list. This is independent of what one types in the URL field before hitting cancel.
In reply to Gustav W Delius

Re: Please test new Windows Cron solution

Martin Dougiamas -
Core developers Նկարը Documentation writers Նկարը Moodle HQ Նկարը Particularly helpful Moodlers Նկարը Plugin developers Նկարը Testers Նկարը
OK, that's a GUI bug for Peter since I don't have Delphi 7.

Are the registry entries all cleared after uninstall?
In reply to Martin Dougiamas

Re: Please test new Windows Cron solution

Peter Honan -
No problem, I'll check these out tomorrow in the AM..blush
In reply to Peter Honan

Re: Please test new Windows Cron solution

Martin Dougiamas -
Core developers Նկարը Documentation writers Նկարը Moodle HQ Նկարը Particularly helpful Moodlers Նկարը Plugin developers Նկարը Testers Նկարը
No worries, Peter, thanks!
In reply to Martin Dougiamas

Re: Please test new Windows Cron solution

Peter Honan -

Moodle Cron issues:

  • "CTRL-ALT-DEL and then killing the Moodle Cron process" for uninstall.
    Probably best to issue the net stop moodle_cron in the uninstall batch file like you have suggested.
  • "everytime one clicks cancel on the URL dialogue" during setup.
    blush fixed....
  • "Are the registry entries all cleared after uninstall?"
    Added to unistall process for service.

Sorry for the delay, our ISP went down this morning. I've just had the chance to post now.....angry

In reply to Peter Honan

Re: Please test new Windows Cron solution

Martin Dougiamas -
Core developers Նկարը Documentation writers Նկարը Moodle HQ Նկարը Particularly helpful Moodlers Նկարը Plugin developers Նկարը Testers Նկարը
No worries, Peter!  That's what open source development is all about!

Thanks for the new Moodlecron.exe - I've added it to the download package.
In reply to Martin Dougiamas

Re: Please test new Windows Cron solution

Petr Skoda -
Core developers Նկարը Documentation writers Նկարը Peer reviewers Նկարը Plugin developers Նկարը
I have tried to make some NSIS installer script to make the installation easier for some users. See MoodleCron.nsi
In reply to Petr Skoda

Re: Please test new Windows Cron solution

Petr Skoda -
Core developers Նկարը Documentation writers Նկարը Peer reviewers Նկարը Plugin developers Նկարը
... here is the final installer.
In reply to Petr Skoda

Re: Please test new Windows Cron solution

Martin Dougiamas -
Core developers Նկարը Documentation writers Նկարը Moodle HQ Նկարը Particularly helpful Moodlers Նկարը Plugin developers Նկարը Testers Նկարը
Oh, WOW, Petr!  VERY slick! համաձայն եմ  համաձայն եմ

Peter, you have got to check that out.  Can I ask you to make one small change to the Moodlecron.exe and post it Petr for repackaging - then it will be completely perfect.

Just change the text on the last dialogue from:

"If you wish to access these setting use regedit or unistall and reinstall this service"  (sic)

to

"To uninstall this program please use the "Add or Remove Programs" Control Panel in Windows"

And Petr, I think you can remove the bit about "closing all applications" on the first screen ... it doesn't apply here, does it?  I always ignore the warning for other software in any case.  աչքով եմ անում   I love the Moodle screenshot in there and it all looks really really clean.  համաձայն եմ
In reply to Martin Dougiamas

Re: Please test new Windows Cron solution

Petr Skoda -
Core developers Նկարը Documentation writers Նկարը Peer reviewers Նկարը Plugin developers Նկարը

I will also include the sources - IMHO they should be installed by default.

BTW I did try to compile the sources, but failed - there was some missing library, could you please tell us what is needed? thanks!

Another idea: maybe it would be better to store the settings in Software/MoodleCron instead of Software/Moodle. In that case delete only the keys you created, the installer will delete the rest.

I will check the "closing applications", it is default text - but I think I can tweak it, if you wish աչքով եմ անում

skodak

In reply to Petr Skoda

Re: Please test new Windows Cron solution

Martin Dougiamas -
Core developers Նկարը Documentation writers Նկարը Moodle HQ Նկարը Particularly helpful Moodlers Նկարը Plugin developers Նկարը Testers Նկարը
If someone can post the final moodlecron here I'll put it up on the downloads pages and installation documentation ASAP.
In reply to Martin Dougiamas

Re: Please test new Windows Cron solution

Petr Skoda -
Core developers Նկարը Documentation writers Նկարը Peer reviewers Նկարը Plugin developers Նկարը
I will try to recompile it myself and repackage it.
(I never used Dephi before :-O)
In reply to Petr Skoda

Re: Please test new Windows Cron solution

Peter Honan -

Sorry gents, your comment on the unkown component threw me surprise, I've now hopefully resolved that and removed the offender...also provided credits and licence details for another component that I do use.

The suggestion of altering the registry key is also done.

Try this one, I've only just compiled it but I've got it running on our production server with no hassles approve

In reply to Peter Honan

Re: Please test new Windows Cron solution

Martin Dougiamas -
Core developers Նկարը Documentation writers Նկարը Moodle HQ Նկարը Particularly helpful Moodlers Նկարը Plugin developers Նկարը Testers Նկարը
Sorry, Peter, but this version still has that text on the last screen.  Could you change that?
In reply to Martin Dougiamas

Re: Please test new Windows Cron solution

Peter Honan -

Should I just leave the text relating to the install/uninstall out of the exe and leave that to Petr to include in his install script? mixed

Done in this version....smile

In reply to Peter Honan

Re: Please test new Windows Cron solution

Petr Skoda -
Core developers Նկարը Documentation writers Նկարը Peer reviewers Նկարը Plugin developers Նկարը
thanks, I will get to it later tonight...
In reply to Petr Skoda

Re: Please test new Windows Cron solution

Petr Skoda -
Core developers Նկարը Documentation writers Նկարը Peer reviewers Նկարը Plugin developers Նկարը
I have updated the installer.
In reply to Petr Skoda

Re: Please test new Windows Cron solution

Martin Dougiamas -
Core developers Նկարը Documentation writers Նկարը Moodle HQ Նկարը Particularly helpful Moodlers Նկարը Plugin developers Նկարը Testers Նկարը
This is now the version available for download!

Thanks Peter and Petr!!       համաձայն եմ
In reply to Martin Dougiamas

Re: Please test new Windows Cron solution

C R -

I get the following informational message in the Windows Application Log:

The description for Event ID ( 0 ) in Source ( Moodle Cron ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: Service started.

After about 30-40 of these informational messages (one every 10 minutes), it turns into a critical message and then the moodlecron.exe will not run.

Any ideas?

In reply to C R

Re: Please test new Windows Cron solution

Heather P -
I've got exactly the same message although I don't think ours goes to critical. When I click to run the cron script from the admin page it says it has run just fine.
Now 15 minutes on the cron seems to have run again on all the instances of moodlle this time not just the one I clicked the script in,  but not only sent out messages from the forums that were not working before but also put up the above message in the event viewer again.
Now I don't know if I have a real problem or not. I can live with an event viewer stuffed full of cron messages provided that the cron is actually doing its job which it seems to be. Is this normal? Do I need to worry about the dll and registry?
Thanksmixed
In reply to Heather P

Re: Please test new Windows Cron solution

Paul Foster -

I have the same error. Was this issue ever resolved.

Thanks

In reply to Paul Foster

Re: Please test new Windows Cron solution

Bob Eadie -

I have the same event log error every ten minutes.

Going to a cmd windows and running moodlecron also fives the error in the event log, though no error in the cmd window.

Any help out there??

Bob

In reply to Bob Eadie

Re: Please test new Windows Cron solution

J Handler -
I have the same issue.  I am guessing here that the problem is that Event ID (0) is the return value reporting the job ran correctly, however nothing was built into the app with a description for the return code of 0.  Anyone have a fix?
In reply to J Handler

Re: Please test new Windows Cron solution

chris dennison -
I've very recently started running moodle, and I'm getting the same eventlog messages as above. I tried using regedit to switch logging off as per the readme, but now get a "moodlecron.exe" error which includes the following:

'The following information is part of the event: Socket Error # 10061
Connection refused..'

Thanks for any advice..

In reply to chris dennison

Re: Please test new Windows Cron solution

Ian Scott -

I get 'The description for Event ID ( 0 ) in Source ( MoodleCron ) cannot be found'. But the server runs to completion so not an issue - before this I found the path to my cron.php was incorrect (due to setting up another instance) - use regedit to check the value and correct (plus set the job run to every minute while in test mode) - remember to restart the service when you change a value by regedit.

In reply to Ian Scott

Re: Please test new Windows Cron solution

Jamie Tinley -
I was getting this error also. For newbies like me I'm giving a details that worked for me: (you can see how moodlecron.exe is running by right clicking my computer and click manage. then click on plus next to system tools, the plus on event viewer, and then on application. There you will see the moodlecron.exe. mine had a red x every 5 minutes.)

I uninstalled it from program/moodlecron uninstall. Then reinstalled choosing 5 minutes instead of 10 and more importantly, changed their address of htt://localhost . . . . to my moodle address. You can test your moodle cron address first by going to your moodlesite and adding in the address bar /admin/cron.php and you will see it run. copy that address from your webpage and paste it into the moodlecron page instead of their localhost. Now mine runs every 5 minutes with no error.

good luck to anyone else reading this.