CRON doesn't work

CRON doesn't work

by Bernard Langer -
Number of replies: 6

Hello,

My moodle scripts are working fine...
/moodle/admin/cron.php also works very fine manually...Bud my provider doesn't support "cron like" tasks.... So I tried to install sinc32 on my WINXP computer. No installations problems, URL.txt has been set up properly (I hope so...) bud nothing happens !

So my questions :
Are cron jobs really necessary ?
Is there any alternative for posting forum-mails without cron ? (for instance sending directly the mail without the 30 min delay). What is the name of the script performing that ?

Sorry for bad english (french frog...)
http://www.aromath.net/moodle & http://www.aromath.net

Regards
Bernard

Average of ratings: -
In reply to Bernard Langer

Re: CRON doesn't work

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
I think it will be a lot simpler to just get cron working that to start removing it. Cron takes care of a lot of things besides forum posts.

The Moodle cron package for Windows (sinc32.exe etc) works fine for me and many others on Windows XP. Your URL.txt should contain just this:

http://www.aromath.net/moodle/admin/cron.php

...and the program must be running (it appears as little taskbar icon).
In reply to Martin Dougiamas

Re: CRON doesn't work

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
An alternative scheme is to use Windows XP's Task Scheduler.

I've made a little package that should make this fairly easy to set up.

http://moodle.com/download/moodle-cron-for-windows-xp.zip

Could you (and anyone else who wants to) give this a try for me?
In reply to Martin Dougiamas

Re: CRON doesn't work

by Bernard Langer -

Sure Martin !!
The script is running on my computer...
I had to re-planify the task.. After dragging the task to the sheduler the user who created the task was Martin and the shedule parameters where not correct.... So I had to create a new task bud no problem, it works !
So I test forum posts... News to morrow !
Many Thanks !

Bernard

In reply to Martin Dougiamas

Re: CRON doesn't work

by Bernard Langer -
Hello Martin,
I tried your package... Same result as sinc32 : nothing happens. So, how can I test the functions ? Waiting half an hour is very long... I suppose that there is a problem with wget.exe. Have you an idea how to test wget BEFORE scheduling the task ?
And...
I understand why my provider does'nt support cron task...
My personnal computer is not a server (it have to sleep sometimes...) So run sinc32 or any schedule task on my personnal computer is not the good solution...
Perhaps can you or your organization or someone else offer this service approve.gif... I had a dream...
Regards
Bernard wink.gif
In reply to Bernard Langer

Re: CRON doesn't work

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
(Bernard sent me some more information privately)

OK, I had a quick look at your setup.

wget connects to the server but receives a 303 error and fails. The EXACT SAME THING is happening when I use wget from my own machines to your server (Windows or Linux).

When I use a browser, though, it works fine.

So it really looks like a problem on your server. For some reason it is rejecting access from certain web clients but not from others. I think you need to talk to your sysadmin to find out what is going on.

Cheers,
Martin
In reply to Martin Dougiamas

Re: CRON doesn't work

by Bernard Langer -

Hi Martin,

First of all : good luck for your thesis. I'm sure that you will be the best !

And now an answer to my cron problems... The solution that worked for me was to install the lynx browser (wget don't work... why I don'y know) on my computer. sinc32 works fine with this line in moodle-cron.bat :

lynx -dump http://MYURL/moodle/admin/cron.php

Regards
Bernard