Best practice forum (Archived)

La discussione è stata rimossa.

 
L'intervento è stato rimosso
Wednesday, 8 January 2014, 10:17
Il contenuto di questo intervento è stato rimosso, non è più possibile visualizzarlo.
? ?
Re: How can I fix this
di ? ? - Wednesday, 8 January 2014, 14:06
 

Hey Liz,

the full Program cron generally only runs once a day as it is extremely database-intensive. It checks assignments that are based on first login every hour, and everything else daily. We intend to refactor that code to make it less of a load at some point but for now...

If you want the full program completion cron to run more often, say hourly:In totara/program/cron.php around line 86 there is a function program_daily_cron(), there is a line

$dailycron = 60 * 60 * 24; // one day

You could change that to either

$dailycron = 0; //will run on every cron

or

$dailycron = 60 * 60; // one hour

We'll have to make this a configurable option at some point as it does tend to confuse/annoy people new to Totara.

L'intervento è stato rimosso
Wednesday, 8 January 2014, 14:57
Il contenuto di questo intervento è stato rimosso, non è più possibile visualizzarlo.
? ?
Re: How can I fix this
di ? ? - Wednesday, 8 January 2014, 15:43
 

Well admin/cron.php basically calls every single components own cron function (if it exists). The Program cron does most of the calculations daily. In the normal course of events when people are using the system day-to-day there is instant course completion which would normally trigger Program completion too, but I'm not sure if that works properly when using the course completion import tool.

There are a few outstanding enhancement requests to improve Programs and yeah it would be best if they always completed instantly in all circumstances.

In the meantime if you want you could

DELETE FROM mdl_config WHERE name='totara_program_lastdailycron';

Then just run admin/cron.php and that should make the full program cron stuff run every time, which may be useful for testing but not really recommended once the site is in production :-)