MoodleCron.exe is returning a 404 error on our server. Our Windows web server requires directory authentication to view the Moodle site. Could this be the problem? Is there any way to pass authentication parameters through MoodleCron? I tried the format http://user:pass@localhost/moodle/admin/cron.php without success. Thank you for letting me know.
Richard
I figured out a workaround. If you have directory security enabled on
your IIS Moodle installation, don't use MoodleCron. Instead create a
Windows Scheduled Task on your server. This passes credentials and executes the cron.php script from the command line, getting around nasty browser authentication issues.
- Open Control Panel --> Scheduled Tasks on your server
- Open Add Scheduled Task. Select Next.
- When asked to select an application, Browse to your PHP installation and select PHP.exe. Select Next.
- Create a name for the task (I called mine "Moodle cron")
- Perform this task "daily." Select Next.
- Perform this task "every day" (leave the other items on defaults). Select Next.
- Enter the name and password of a user who has directory privileges on your /moodle/admin folder. Select Next.
- Select "Open advanced properties for this task when I click Finish." Select Finish.
- Under the Task tab, append the location of cron.php to the Run field, e.g. c:\php\php.exe d:\webroot\moodle\admin\cron.php
- Under the Schedule tab, click Advanced and then select Repeat
Task in order to make the task run more often than once per day. I set
mine to run every ten minutes. Select Apply.
- Select OK. You're done! Check the Event log later to ensure that the script is not returning errors.
clever thinking