Best practice forum (Archived)

This forum discussion has been removed

 
David Curry (Core Developer)
Re: Program course sets
by David Curry (Core Developer) - Monday, 1 April 2013, 1:03 PM
Group Totara

Hi Guys,

The program cron (/totara/program/cron.php) has an hourly cron that does enrolments and a daily cron that does a whole load of other things including completions. There are a couple of things you can do to make completions run more often, but they are both code changes.

In totara/program/cron.php you can edit lines

#61     $hourlycron = 60 * 60; // one hour

and

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

so for example, changing the hourly cron to 60 * 10 would make it run every 10 minutes.

Though making the entire daily cron run more often could put your server under a bit of strain so if all you want is completion running more often I would recommend moving this line

#100     program_cron_completions();

from the daily cron to the hourly cron, say just under the line

 #74     program_cron_first_login_assignments();

Hope that helps,
David