Best practice forum (Archived)

Audience assignment after Totara Sync

 
Mei Chan
Audience assignment after Totara Sync
by Mei Chan - Sunday, 2 November 2014, 5:43 PM
 

Again I am still very new to Totara and hope this question make sense..

I uploaded some new users and have noticed they're not assigning to audiences and thus programs or courses automatically until some time after (say 24 hours).

I reckon it's CRON related, then run the CRON under Home> Site administration> Server> Cron

However, it's still not assigning with a matching audience rule.

I might be missing something here. Anyone knows?

me
Re: Audience assignment after Totara Sync
by George Angus - Sunday, 2 November 2014, 6:54 PM
Group Totara

Hi Mei,

This is the program cron which runs daily, it checks to see if its been run in the past 24 hours so running the cron manually will not trigger it. It is possible to make it run more frequently - but then you may face performance issues.

regards,

George.

Mei Chan
Re: Audience assignment after Totara Sync
by Mei Chan - Sunday, 2 November 2014, 7:05 PM
 

I see. Thank you George! Running daily is fine but occasionally will need to manually trigger it for a manual error fix (e.g. fix an error withtin Totara Sync).
Is it a program to be triggered in Totara application or something on the server side? How can I trigger this?

me
Re: Audience assignment after Totara Sync
by George Angus - Sunday, 2 November 2014, 7:37 PM
Group Totara

Hi Mei,

If you look in the code here: totara/program/cron.php

You can change the settings here:

$hourly = 60 * 60; $daily = 60 * 60 * 24; 

cheers,

George.

 

? ?
Re: Audience assignment after Totara Sync
by ? ? - Monday, 3 November 2014, 2:49 PM
 

Also, something you could bring up to your partner, but one way we get around this is some custom cron scheduling for dynamic audiences and programs. As George mentioned, yes you can customize the program cron to allow it to run more often. In some cases we have taken the route of a custom program cron, same as the existing one, but made it so that we can execute it with a custom cron schedule via the CLI. This way we can target only program cron to execute more often, rather than the whole system cron. In addition to that, you can execute an enrol/cohort/cli script (and schedule with a custom cron job). This cron is what updates dynamic audience membership.

Naturally, as was mentioned, you want to keep performance in mind for running these crons more often. In my experience, the execution of program and cohort/dynamic-audience crons took a small enough amount of time that it seemed acceptable. With that said, scheduling these crons should take into consideration other crons and the master cron schedule, as it is best that they don't run at the same time.

 

Mei Chan
Re: Audience assignment after Totara Sync
by Mei Chan - Tuesday, 4 November 2014, 2:59 PM
 

Thank you for all your input on this :)

This forum post has been removed
Monday, 8 December 2014, 7:17 PM
The content of this forum post has been removed and can no longer be accessed.
Wen Hao Chuang
Re: Audience assignment after Totara Sync
by Wen Hao Chuang - Tuesday, 9 December 2014, 10:29 AM
 

Hi Maurice,

Did you mean that if one "edit" the audience rule set and "approve changes" (even without any actual changes), this action will automatically trigger that daily Totara sync again? Can you please confirm? Thanks!