Best practice forum (Archived)

This forum discussion has been removed

 
This forum post has been removed
Wednesday, 8 January 2014, 10:17 AM
The content of this forum post has been removed and can no longer be accessed.
? ?
Re: How can I fix this
by ? ? - Wednesday, 8 January 2014, 2:06 PM
 

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.

This forum post has been removed
Wednesday, 8 January 2014, 2:57 PM
The content of this forum post has been removed and can no longer be accessed.
? ?
Re: How can I fix this
by ? ? - Wednesday, 8 January 2014, 3:43 PM
 

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 :-)