cron installation

Re: cron installation

by Adebowale Adedayo -
Number of replies: 3

Thanks @luis de Vasconcelos.

i have that but is not still runnin, i always got thesame response.

In reply to Adebowale Adedayo

Re: cron installation

by Daniell Goodin -

Hi Adebowale, 

I understand how frustrating this can be when you see this. And there is a learning curve attached that could take a few days to do. 

I know as been through it and still not happy with my knowledge on the "Cron" thing. But as it is an essential service component of keeping your Moodle site running in the best state and also gives you access to vital statistics that may be needed. i.e if Cron is not running you are not getting the necessary backend procedures getting ticked off. 


ok, Since we have got that out of the way of how important it is to have to run. 

My suggestion is to use a site like this. (read the moodle instructions on the ticks you have to do to allow this to happen)

https://cron-job.org/


Understand there is a security consideration to using an external 3rd party for this but it works well.  

I didn't read the base you have your setup on?

You may want to go back to your Cloudbase server suppliers forums (if you are using a cloud-based spinup) and read through the help forums as there is plenty in there. 

At the moment I have a bit of a problem when I load in a plugin, in that Cron will throw errors. But this is fixed by a set of terminal commands that reset permissions on the affected directory. 


Once you get it going its pretty much set and forget. 

In reply to Daniell Goodin

Re: cron installation

by Adebowale Adedayo -
Thanks. I've done it. But the little problem I have right now is I can't

export question from questions bank



On Thu, 3 May 2018 1:07 am Daniell Goodin (via Moodle.org), <
In reply to Adebowale Adedayo

Re: cron installation

by Luis de Vasconcelos -

What happens when you open up a command line window (cmd.exe) and enter:

cd c:\path\to\your\moodle\admin\cli
php cron.php

Does it run the cron?

If you can't get the Scheduled Task to run the \admin\cli\cron.php file then put the command into a batch file and set the Scheduled Task to run the batch file instead of the \admin\cli\cron.php file, like this: 

@echo off
set phpdir=C:\path\to\your\PHP\folder
set moodleclidir=C:\path\to\your\moodle\admin\cli
%phpdir%\php.exe %moodleclidir%\cron.php
echo Cron done!
pause
exit
The nice thing about that is that you can modify it slightly so that it logs the output of the \cli\cron.php script, like this:

@echo off
set phpdir=C:\path\to\your\PHP\folder
set moodleclidir=C:\path\to\your\moodle\admin\cli
%phpdir%\php.exe %moodleclidir%\cron.php >> cron_output.log
echo Cron done!
pause
exit
Then you can read the log file if you need to troubleshoot anything cron related...